Java packager

From HandWiki - Reading time: 1 min

The Java Packager tool is a tool included in the JDK which allows to package Java applications from the command line. It is an alternative to using other packaging tools like Apache Ant.[1]

Note that the Java Packager does not automatically produce a Jar file. Many other formats are available, including native executable formats for the platform.

The Java Packager tool for JDK 9

The Java Packager tool will evolve for JDK 9, making it aware of modules, allowing for example to package a module and all the modules it depends on.[2]

Example

For example, the following command will create a outputJar.jar file with the content of the classesDir directory, and will set the myPackager.MainClass as the executable class of the jar file:

javapackager -createjar -appclass myPackager.MainClass -srcdir classesDir -outdir out -outfile outputJar -v

References

External links





Licensed under CC BY-SA 3.0 | Source: https://handwiki.org/wiki/Java_packager
8 views | Status: cached on October 31 2024 12:19:52
↧ Download this article as ZWI file
Encyclosphere.org EncycloReader is supported by the EncyclosphereKSF