Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
List contents of Java jar file under Linux

The easiest way to list the contents of a .jar file under Linux is using: jar tvf yourjarfile.jar

This is how it looks in practice

hlars@meintempel ~/Downloads $ jar tvf maventutorial1-0.0.1-SNAPSHOT.jar 
     0 Tue Jan 08 16:18:50 CET 2019 META-INF/
   131 Tue Jan 08 16:18:48 CET 2019 META-INF/MANIFEST.MF
     0 Tue Jan 08 16:18:48 CET 2019 com/
     0 Tue Jan 08 16:18:48 CET 2019 com/denofprogramming/
     0 Tue Jan 08 16:18:48 CET 2019 com/denofprogramming/random/
   796 Tue Jan 08 16:18:48 CET 2019 com/denofprogramming/random/DefaultRandomGenerator.class
   202 Tue Jan 08 16:18:48 CET 2019 com/denofprogramming/random/RandomGenerator.class
  1006 Tue Jan 08 16:18:48 CET 2019 com/denofprogramming/random/App.class
     0 Tue Jan 08 16:18:50 CET 2019 META-INF/maven/
     0 Tue Jan 08 16:18:50 CET 2019 META-INF/maven/com.denofprogramming/
     0 Tue Jan 08 16:18:50 CET 2019 META-INF/maven/com.denofprogramming/maventutorial1/
  1473 Tue Jan 08 16:17:48 CET 2019 META-INF/maven/com.denofprogramming/maventutorial1/pom.xml
   128 Tue Jan 08 16:18:48 CET 2019 META-INF/maven/com.denofprogramming/maventutorial1/pom.properties
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.