Forrest logo
back to the jar tool

jar:tldr:f5e03

jar: List a .jar/.war file content with verbose output.
$ jar tvf ${filename-jar}
try on your machine

This command is used to display the contents of a Java Archive (JAR) file. Let's break it down:

  • "jar" is the command-line tool in Java Development Kit (JDK) used to work with JAR files.
  • "t" is an option used to indicate that we want to list the contents of the JAR file.
  • "v" is another option used to enable verbose output, which means it will display more details about each entry in the JAR file.
  • "f" is used to specify the JAR file that we want to operate on.
  • "${filename-jar}" is a placeholder that represents the name of the JAR file. You would replace this with the actual filename of the JAR file you want to list the contents of.

So, when you run this command with the appropriate JAR file name, it will display a list of all the files and directories contained within the JAR file.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the jar tool