Home
Blog
Tech How To
Jobs

Cracking Jars

You can view the contents of a jar

  jar -tvf $PATH_TO_JAR/my.jar

You can extract the files from a jar

  jar -xvf myclass.class $PATH_TO_JAR/my.jar

You can even run stuff in a jar. This runs the main class

  java -classpath "./GettingStarted-20060221.jar:/opt/ant/1.6.5_5-6/lib/junit.jar" main