"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, 1597👍, 0💬
What Is javamail1_1_3.zip? javamail1_1_3.zip is the binary package of JavaMail API 1.1.3 in ZIP form...
What Is jms.jar? I heard it's related to JMS (Java Message Service) 1.1? The if you have an jms.jar ...
How to download and install ojdbc14.jar for Oracle 10g R2? ojdbc14.jar for Oracle 10g R2 is a Java 1...
What Is commons-codec-1.3.jar? commons-codec-1.3.jar is the JAR file for Apache Commons Codec 1.3, w...
What is jxl.jar 2.6.12? jxl.jar 2.6.12 is the JAR file for Java Excel API 2.6.12, which is a Java li...