"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.
2020-04-16, 10790👍, 1💬
JSP(tm) Standard Tag Library 1.1 implementation - Jakarta Taglibs hosts the Standard Taglib 1.1, an ...
GJT (Giant Java Tree) implementation of XML Pull Parser. JAR File Size and Download Location: File n...
Mailer Tag library, Release 1.1, is used to send e-mail. JAR File Size and Download Location: File n...
The goal of the Geronimo project is to produce a server runtime framework that pulls together the be...
maven-core-3.5.4.jar is the JAR file for Apache Maven 3.5.4 Core module. Apache Maven is a software ...