In this post, I will explain how to unzip a jar file. Below is the complete code to unzipping a jar file programmatically Main code 1 package jar; 2 3 import java.io.File; 4 import java.io.FileOutputStream; 5 import java.io.IOException; 6 import java.io.InputStream; 7 import java.util.Enumeration; 8 import java.util.jar.JarEntry; 9 import java.util.jar.JarFile; 10 11 public class JarDemo2…… Continue reading Unzipping a jar file programmatically
Tag: Jar
Exploring jar files programmatically
In this post under java, I will show how to browse a jar file programmatically. For the example I will browse the mockito jar file. So I will add the “mockito-core-2.11.0.jar” in the classpath of the java file. Below is the complete code for browsing the jar file programmatically Main Code 1 package jar; 2…… Continue reading Exploring jar files programmatically