4. Capabilities and Restrictions

Applets are restricted by the Security Manager of the browser that is running them.

4.1.1. Common security restrictions:

  • Applets can't load libraries or define native methods.

  • An applet can't ordinarily read or write files on the host that's executing it.

  • An applet can't make network connections except to the host that it came from.

  • An applet can't start any program on the host that's executing it.

  • An applet can't read every system property.

  • Windows that an applet brings up look different than windows that an application brings up:

    Figure 12.6. Applet Look

    Applet Look

4.2.1. Capabilities that Applications Don't Have

  • Applets can play sounds.

  • Applets running within a Web browser can easily cause HTML documents to be displayed.

  • Applets can invoke public methods of other applets on the same page.

4.2.2. More Applet Capabilities

  • Applets that are loaded from the local file system have none of the restrictions that applets loaded over the network do.

  • Although most applets stop running once you leave their page, they don't have to.

Audio in Portuguese