ADC Home > Reference Library > Technical Q&As > Legacy Documents > Java >

Legacy Documentclose button

Important: This document is part of the Legacy section of the ADC Reference Library. This information should not be used for new development.

Current information on this Reference Library topic can be found here:

Using .zip and .jar Files With Applets


Q: Normally, when you run an applet, you have several class files, and an html file that calls your main class like this:

<APPLET CODE="MyMainClass.class" WIDTH=200 HEIGHT=200>< /APPLET>

What if I want to have all my classes in a .jar or .zip file? If this is possible, what html code do I now use to call the applet?

A: To load your applet classes from a .jar or .zip file, you need to use the " ARCHIVE" tag in your applet statement. An example of this would be:

<APPLET ARCHIVE="classes.jar" CODE="MyMainClass.class" WIDTH=200 HEIGHT=200>< /APPLET>

where "classes.jar" would be the name of your .jar or .zip file containing the "MyMainClass.class" and its supporting class files.

[Feb 22 1999]


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.