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).