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: Medicine is just very bodgey and unreliable hacky patches to the spaghetti code of life.
gollark: > as bad as it is to say, most of the deaths are people that are only alive from medicine artificially inflating life spans well beyond the designed parameters... is wanting to live longer a bad thing now? There are no "designed parameters" with humans, what with us being weird evolved systems, only "mostly works" ones, and we've been continually pushing those with stuff like, well, medicine.
gollark: The mortality rate of coronavirus is significantly higher than 1% or 2% or whatever if healthcare stuff gets overloaded. Which could happen, and I think is kind of in Italy.
gollark: The Earth isn't flat. It's nonexistent. r/noearthsociety
gollark: The flat moon, probably.
References
- "The Java Packager Tool". Oracle Corporation. Retrieved 2017-07-31.
- "JEP 275: Modular Java Application Packaging". Oracle Corporation. Retrieved 2017-07-31.
External links
This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.