Mill JVM Build Tool: Directly Executable Assembly JARs

2025-01-02

Mill JVM build tool creates assembly JARs that are directly executable, eliminating the need for the `java -jar` command. This is achieved by prepending a shell script to the JAR file, which then invokes the Java runtime. This script is cleverly designed to be compatible with both Unix and Windows systems, enabling cross-platform executability. The article details how this works, leveraging the nature of ZIP files to concatenate a launcher script with the JAR contents for seamless execution. This significantly improves the integration of Java programs into command-line workflows.

Development build tool