Java Archives in Java 1.2
Figure: Java Archive Commands
Continued from Bye-Bye, <applet>, Hello, <object>
These common Java archive file commands are used with JAR to create, view, extract, and run Java archives.
Java Archive Commands
Operation |
Command |
Creating a JAR file |
jar cf jar-file input-file(s) |
Viewing the contents of a JAR file |
jar tf jar-file |
Extracting the contents of a JAR file |
jar xf jar-file |
Running an application packages as a JAR file. (with version 1.1) |
jar xf jar-file archived-file(s) |
Running an application packages as a JAR file. (with version 1.2; requires a Main-Class manifest header) |
jre -cp app.jar MainClass |
Invoking an applet packaged as a JAR file |
<applet code=AppletClassName.class archive="JarFileName.jar" width=width height=height></applet> |
More Programming
Published as Internet Builder in the 2/23/99 issue of PC Magazine.
Related Links:
Java 2 SDK -- First Looks 3/3/98
The new Java standard from Sun provides the richest array of functionality yet for developers and users.
Your Guide to Java -- PC Magazine Labs
A comprehensive guide to Java applications, environments
applet tools, and development packages
Coding Java -- ZDNet DevHead
Reviews, tutorials, and tips for Java programmers, from beginners to experts.
Java Library -- ZDNet Software Library
Download hundreds of Java development tools.
Programming Courses -- ZDU
Sign up for Java, Perl, C++, and VB classes now.
|