Applets & Web Browsers

Most software programs are executed by clicking the mouse on an icon on your operating system desktop or executing a command in a shell program. Programs executed in this fashion are known as applications. Java programs run just like other applications. Besides applications, Java also has a new paradigm for running programs: applets. An applet is a program that runs inside a web browser, just as the web browser runs "inside" the operating system. Applets offer many benefits over traditional applications. Chief among these are convenience, platform independence, robustness, and security.

  1. Convenience

    Java applets offer unprecedented convenience for users, while offering all the functionality you expect in a modern graphical user interface. Unlike traditional applications, applets do not need to be installed. Just as you can embed text and graphics in an HTML document, you can also embed an applet by using special HTML authoring tags. When you load any such document in a Java-enabled web browser, the browser will automatically retrieve the applet's executable code and run it without any user intervention. It is just as automatic as displaying text or graphics.

    The automatic retrieval of applets by web browsers greatly simplifies deployment and updates. Not only do you not have to worry about installing the program on every client computer, but you also are guaranteed that anyone running the applet is using the most recent version.

  2. Platform Independence

    Owing to the Java Virtual Machine, or JVM, included in Java-enabled web browsers, Java applets can be run unmodified on any number of computer architectures and operating systems. If you embed an applet in your web site, you do not need to include different versions of the applet for Windows, OS/2, Linux and Solaris. You only need one.

  3. Robustness

    The JVM included in a Java-enabled web browser acts as a buffer between applets and the operating system, and prevents them from accidentally interfering with the other operations of the computer. How many times has a program locked up and refused to exit? How many times has an application crashed the whole operating system, making you reboot the computer? Java applets--and applications--are not immune from bugs, but the bugs they do have are unlikely to impact anything outside of the JVM.

  4. Security

    The JVM inside a web browser enforces strict rules on how an applet can interact with your computer and the network. Applets may not access your computer's file system--unless you loaded the applet from a page on your file system, in which case it is trusted to read files in the directory from which it was loaded. Nor can applets read the clipboard, initiate print jobs, or start other programs. Furthermore, an applet is restricted from opening network connections to any host other than the one from which it was loaded. Malicious applets --if such things exist--are thus prohibited from doing things that could cause harm to your computer or compromise any confidential data stored on it.

    If an applet needs permission to do certain privileged operations, it can be digitally signed by a certificate registered with a Certificate Authority, like VeriSign ( or Thawte ( Such a certificate identifies the author of the program, like DevTech. If you trust the author not to do anything malicious, and if you trust that the CA associated with the certificate has verified that the certificate owner really is who they say they are, then you may choose to grant that applet permission to exercise such privileges.

All of these things combine to make Java the most secure, widely used environment for running Internet-related programs.