The JavaTM Tutorial
Previous Page Lesson Contents Start of Tutorial > Start of Trail > Start of Lesson Search
Feedback Form

Trail: Writing Applets
Lesson: Taking Advantage of the Applet API

Platform-specific Details: Creating a JAR File

You can create JAR files using the JDK jar tool. Some examples of creating JAR files follow.

To create a JAR file named file.jar that includes compressed versions of all of the class and GIF files in the current directory:

jar cvf file.zip *.class *.gif 
To create a JAR file for an applet whose classes are in a package named com.mycompany.myproject:
jar cvf file.zip com/mycompany/myproject/*.class *.gif (Solaris)
jar cvf file.zip com\mycompany\myproject\*.class *.gif (Windows 95/NT)

Previous Page Lesson Contents Start of Tutorial > Start of Trail > Start of Lesson Search
Feedback Form

Copyright 1995-2001 Sun Microsystems, Inc. All rights reserved.