"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, 6923👍, 1💬
JasperReports, the world's most popular open source business intelligence and reporting engine and J...
What Is javamail-1_2.zip? javamail-1_2.zip is the binary package of JavaMail API 1.2 in ZIP format. ...
JLayer is a library that decodes/plays/converts MPEG 1/2/2.5 Layer 1/2/3 (i.e. MP3) in real time for...
The Bouncy Castle Crypto package is a Java implementation of cryptographic algorithms, it was develo...
JRE 8 plugin.jar is the JAR file for JRE 8 Java Control Panel Plugin interface and tools. JRE (Java ...