Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Mail Systems
Eclipse Documentation

How To Guides
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Problem Solutions
Privacy Policy




Attribute for <APPLET ...>

Usage Recommendation
thumbs up use it

ARCHIVE designates the URL of a JAR (Java ARchive) file. A JAR file is a compressed file containing the component files needed to run an applet. For example, the applet below uses ten different class files. Using just the CODE attribute we can point to the top class, which will load the others. That requires ten separate full file downloads. However, ARCHIVE indicates that "FieldTestF.jar" contains some (or all) of the needed resources. The browser downloads the jar file first, and looks in the jar file for class files it needs before heading back out on the net. This saves bandwidth several different ways. Jar files are compressed and download quicker (in our example our one jar file is 10K compared to 15K of class files). Downloading just one file saves the overhead that would be required for (in this case) ten separate downloads. Finally, if every class must be downloaded separately, the applet will start and run as it can, but then stop when it has to wait for some component to download. With jar files, everything is downloaded first, and the applet "starts all at once", which is much more aesthetic.

  WIDTH="100%" HEIGHT="90"
  ARCHIVE = "FieldTestF.jar"
This example uses an applet.

gives us this applet

This example uses an applet.

Any kind of file can be put in a jar file, not just classes. Many people add images that will be used in the applet. Adding images, however, requires a little extra Java programming. For that and other technical details on creating Java applets, we refer you to the applet section of the Java FAQ.

  Copyright 1997-2002 Idocs inc. Published under the terms of the Open Content License Design by Interspire