"jar" Commands to Split A JAR File
How to split a JAR file into two JAR files? I jave a huge JAR file and I only need to use one package of classes from the JAR file.
If you have a huge JAR file and want to build a smaller JAR file with classes from one package from the huge JAR file, you can follow these steps:
1. Put the huge 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 classes from a given package:
\fyicenter\lib>cd temp \fyicenter\lib\temp>jar -xf ..\activation.jar com/sub/activation
4. Create a new JAR file with only one package
\fyicenter\lib\temp>jar -cf ..\activation-sun.jar .
5. Take the activation-sun.jar in the .\lib folder and delete .\lib\temp folder.
Back to FAQ for JDK JAR (Java ARchive) Tool.
2016-05-28, 1842👍, 0💬
ASM is an all purpose Java bytecode manipulation and analysis framework. It can be used to modify ex...
jlGui is a music player for the Java platform. It is based on Java Sound 1.0 (i.e. JDK 1.3+). It sup...
The Digester package lets you configure an XML -> Java object mapping module, which triggers certain...
What Is HttpComponents httpcore-4.4.6.jar? HttpComponents httpcore-4.4.6.jar is the JAR file for Apa...
iText is an ideal library for developers looking to enhance web- and other applications with dynamic...