A self-contained launcher for Java applications, providing @argfile support.
- Some use cases for Java tools require passing a large command line, which can reach the size limit on Windows (or even on Linux). There are workarounds in some scenarios (e.g. using classpath jars, or built-in
@argfilesupport), but not in general. - In some build systems (e.g. SBT), using tools from another JVM is more difficult than running
javaorjavac.
- Supports launching main classes.
- Supports launching
ToolProvidertools (requires JVM 9 or higher). - Supports
@argfiles.
Launch a main class:
$ java -cp my-app.jar -jar tool-launcher.jar -main my.App <args>Launch a Java tool:
$ java -jar tool-launcher.jar -tool jdeps my-app.jarExpand an @argfile:
$ java -jar tool-launcher.jar -tool jdeps @my-args.txtEscape an argument starting with @ (for bash - this depends on your shell):
$ java -jar tool-launcher.jar -tool javac '\@foo'- JVM 8+ for running;
- JVM 9+ for
ToolProvidersupport; - JVM 11+ for building.
- This is versioned via sbt-dynver.
- This is published to Sonatype - you would need to set up your environment as described here