Java packager

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.

## Contents

* 1 The Java Packager tool for JDK 9
* 2 Example
* 3 References
* 4 External links

## 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

1. ↑ "The Java Packager Tool". Oracle Corporation. https://docs.oracle.com/javase/8/docs/technotes/guides/deploy/packager.html. Retrieved 2017-07-31.
2. ↑ "JEP 275: Modular Java Application Packaging". Oracle Corporation. http://openjdk.java.net/jeps/275. Retrieved 2017-07-31.

## External links

* the Java packager tool

0.00

(0 votes)

|

Retrieved from "https://handwiki.org/wiki/index.php?title=Java_packager&oldid=4204235"