### Jar Reference

Some hints on the Jar Parameter
Note:
If jar.exe is not on the path, then create simple batch, like under Windows:
"c:\Program Files (x86)\Java\jdk8\bin\jar.exe" %1 %2
List all files
jar -tf myjar.jar
Extract all files
jar -xvf myjar.jar
Create new Jar
Add two classes:
jar -cvf myjar.jar com/rwblinn/myclass1.class com/rwblinn/myclass2.class
Add all classes:
jar -cvf myjar.jar com/rwblinn/*.class
Update jar by adding new class
jar -uvf myjar.jar com/rwblinn/mynewclass.class
Eclipse - Create a Runnable Jar
Select File > Export > Create Runnable Jar
Ensure to select the right package / class as the Launch Configuration.

Changed: 2018-05-31 18:56, Category: Jar, File: T6C204M1502.htm, ID: 1502