W3docs

Viewing contents of a .jar file

To view the contents of a .jar file, you can use the jar command-line utility that is included with the Java Development Kit (JDK).

To view the contents of a .jar file, you can use the jar command-line utility included with the Java Development Kit (JDK). Note that .jar files are standard ZIP archives, so they can also be opened with tools like WinZip, 7-Zip, or WinRAR.

Open a command prompt, navigate to the directory containing the .jar file, and run the following command:

jar tf jar-file

Replace jar-file with the name of the .jar file. This command lists the names and paths of all files and directories contained in the archive.