The t option indicates that you want to view the table of contents of the JAR file.
The f option indicates that the JAR file whose contents are to be viewed is specified on the command line.
You could also use v option, which will give you additional information.
Operation | Command |
---|---|
To create a JAR file | jar cf jar-file input-file(s) |
To view the contents of a JAR file | jar tf jar-file |
To extract the contents of a JAR file | jar xf jar-file |
To extract specific files from a JAR file | jar xf jar-file archived-file(s) |
To run an application packaged as a JAR file (requires the Main-class manifest header) | java -jar app.jar |
To invoke an applet packaged as a JAR file | <applet code=AppletClassName.class archive="JarFileName.jar" width=width height=height> </applet> |