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.

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
gollark: Also, what about the different MBS modules or whatever>?
gollark: By changes I mean the slightly different styling.
gollark: I'm not really a fan of the changes MBS makes to autocomplete, can those be turned off?
gollark: Unfortunately this turns out to be rather hard.
gollark: So you'd be able to pick any server peered to mine and still get skynet traffic on it.

References

This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.