"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, 1239👍, 0💬
plugin.jar from JDK 1.6.0_06. JAR File Size and Download Location: File name: plugin.jar File size: ...
What Is xercesImpl.jar in Xerces Java 2.11.0? xercesImpl.jar in Xerces Java 2.11.0 is the JAR file f...
Crimson is a Java XML parser which supports XML 1.0 via the following APIs: JAXP 1.1, SAX 2.0, DOM L...
What Is log4j-1.2.13.jar? I got the JAR file from logging-log4j-1.2.13.zip .log4j-1.2.13.jar is the ...
Jettison is a collection of Java APIs (like STaX and DOM) which read and write JSON. This allows nea...