O'Reilly logo

Special Edition Using Java 2 Standard Edition by Geoff Friesen, Chuck Cavaness, Brian Keeton

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating and Viewing a JAR

The JARJARJ tool allows you to create, list, and extract files from JAR archives. It deliberately resembles the Unix tar tool, both in function and in usage. Like other tools in the SDK, the JAR tool is implemented as a Java application, making it portable to any platform supporting Java.

The jar command is used from the command line exclusively. There are many options that you provide to the jar command, depending on what you are trying to do. You can type just jar on the command line to see the options. For a detailed look at the options, see Appendix B, "SDK Tools."

To create a new JAR file, you can use the c option with the jar command. Options can be appended together. When creating a new JAR file, most often you ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required