Java Packager
   HOME

TheInfoList



OR:

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 Apache Ant is a software tool for automating software build processes which originated from the Apache Tomcat project in early 2000 as a replacement for the Make build tool of Unix. It is similar to Make, but is implemented using the Java languag ...
. 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 Broadly speaking, modularity is the degree to which a system's components may be separated and recombined, often with the benefit of flexibility and variety in use. The concept of modularity is used primarily to reduce complexity by breaking a sy ...
, allowing for example to package a module and all the modules it depends on.


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


the Java packager tool
Java (programming language) {{compu-prog-stub