How to View and Extract a JAR
JARs are only ZIP files with a funny name, so you can view and unpack them with any ZIP tool. You may have to change its extension to '.zip' before, if the tool does not recognize the JAR otherwise.
The jar tool shipped with the JDK also allows you to view and extract them on the command line. Use the 't' command to view the content:
C:\Users\tim>jar tvf tmp/jarfiller-example.jar 0 Wed Jan 20 21:34:06 CET 2010 META-INF/ 116 Wed Jan 20 21:34:06 CET 2010 META-INF/MANIFEST.MF 0 Sat Jan 16 16:11:50 CET 2010 com/ 0 Sat Jan 16 16:11:50 CET 2010 com/jarfiller/ 0 Sun Jan 17 15:34:08 CET 2010 com/jarfiller/example/ 287 Sun Jan 17 15:46:18 CET 2010 com/jarfiller/example/Helper.class 56 Sun Jan 17 15:46:18 CET 2010 com/jarfiller/example/Helper.java 569 Sat Jan 16 16:14:00 CET 2010 com/jarfiller/example/MainClass.class 147 Sat Jan 16 16:13:58 CET 2010 com/jarfiller/example/MainClass.java
Unpack a JAR with the 'x' command:
C:\Users\tim>cd tmp C:\Users\tim\tmp>jar xvf tmp/jarfiller-example.jar created: META-INF/ inflated: META-INF/MANIFEST.MF created: com/ created: com/jarfiller/ created: com/jarfiller/example/ inflated: com/jarfiller/example/Helper.class inflated: com/jarfiller/example/Helper.java inflated: com/jarfiller/example/MainClass.class inflated: com/jarfiller/example/MainClass.java

