"jar" Commands to Merge Two JAR Files
How to merge two JAR files with "jar" commands? I am tired of specifying multiple JAR files in the classpath.
If you are tired of specifying multiple JAR files in the classpath, you can merge all JAR files into a single JAR file using these steps:
1. Put all JAR files into .\lib folder.
2. Create a sub folder called temp under .\lib folder.
\fyicenter>cd lib \fyicenter\lib>mkdir temp
3. Go to the .\lib\temp folder and extract all JAR files:
\fyicenter\lib>cd temp \fyicenter\lib\temp>jar -xf ..\A.jar \fyicenter\lib\temp>jar -xf ..\B.jar ...
4. Add all classes into a single JAR file, mySuper.jar:
\fyicenter\lib\temp>jar -cf ..\mySuper.jar .
5. Take the mySuper.jar the .\lib folder and delete .\lib\temp folder.
Back to FAQ for JDK JAR (Java ARchive) Tool.
2016-06-03, 1966👍, 0💬
Batik, Release 1.7, is a Java-based toolkit for applications or applets that want to use images in t...
What Is poi-contrib-3.5.jar? poi-contrib-3.5.jar is one of the JAR files for Apache POI 3.5, which p...
commons-lang3-3.8.1.jar is the JAR file for Apache Commons Lang 3.5, which provides a host of helper...
What Is XMLBeans xbean.jar 2.6.0? XMLBeans xbean.jar 2.6.0 is the JAR file for Apache XMLBeans 2.6.0...
Commons DBCP provides Database Connection Pooling. JAR File Size and Download Location: File name: c...