Applet Security Considerations

Generally speaking, applets are severely restricted as to what they are allowed to do on a user's system. They run, by default, in what is called the sandbox . The sandbox, which is implemented by the java.lang.SecurityManager class or a subclass of it, restricts applets from the following activities. Applets cannot

  • Read from or write to the client machine's file system.

  • Modify thread groups.

  • Connect to any host besides the host they were downloaded from.

  • Access any system properties related to the local machine's file system.

Because of these restrictions, an applet cannot execute code installed on a local machine, and therefore, an applet cannot print from the machine it is running on.

Tip

In Java 2, this ...

Get PURE Java™ 2 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.