View the contents of JAR Files

Command for viewing contents of JAR File in console

jar tf jar-file-name.jar

where,

  • jar indicates to call the jar tool.
  • t indicates to view the content.
  • f indicates to view from the file.
  • jar-file-name indicates the jar file name that to be viewed.

Example

jar tf myjar.jar

Output

Music.class

Equalizer.class

song.mp3


Other commands

  • v indicates to view the contents of JAR with information here.

    Example

    jar tfv myJar.jar

    Output

    699 Fri Jun 29 11:53:28 IST 2018 Music.class

    287 Fri Jun 29 11:53:28 IST 2018 Equalizer.class

    6990 Fri Jun 29 11:53:28 IST 2018 song.mp3