9.1. What Are Applets?

An applet is a particular type of Java program that is intended to be embedded in a Web page. When a user opens a Web page containing an applet, the applet runs locally (on the client machine that is running the Web browser), not remotely (on the system running the HTTP server). Consequently, security considerations are paramount, and applets are restricted from performing various operations that are allowed in general Java programs (“applications”). For instance, you might need to write a stand-alone program that deletes files, but you certainly don't want to let applets that come in over the Web delete your files. These restrictions are enforced by a SecurityManager object on the client system. In version 1.1 and later ...

Get Core Web Programming, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.