"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, 1877👍, 0💬
How to read XML document with DTD validation from socket connections with the socket\DelayedInput.ja.. .
JDK 8 jconsole.jar is the JAR file for JDK 8 JConsole, which is a graphical monitoring tool to monit...
What Is commons-logging-1.2.jar? commons-logging-1.2.jar is the JAR file for Apache Commons Logging ...
Java Cryptography Extension 1.6 JAR File Size and Download Location: File name: jce.jar, jce-1.6.jar...
Swingx is the SwingLabs Swing Component Extensions. JAR File Size and Download Location: File name: ...