Java Reference
In-Depth Information
Figure 14.11
appletviewer displaying the HelloSwingApplet.
Sandbox Security
Applets run in a Web browser restricted to a set of security policies referred to
as sandbox security . The purpose of the sandbox security model is to ensure that
the applet you are downloading and executing is not going to do terrible
things to your computer. This is especially important in today's Internet world
of viruses and other undesirable side effects of software applications.
Applets that are downloaded and executed in a Web browser must adhere
to the following rules:
An applet cannot access any files on a user's operating system.
■■
An applet can only create network connections to the applet's code
base, and cannot connect to other network addresses.
■■
An applet cannot execute a program on the user's machine.
■■
An applet cannot access system information or use system dialog boxes
such the Open File or Print dialog boxes.
■■
An applet can be granted permission to leave the sandbox and perform
an otherwise restricted operation. For example, you can grant an applet
permission to access files on your local hard drive. Of course, you will
want to make sure you trust the source of the applet before granting such
permission.
Search WWH ::




Custom Search