F IGURE 7.7
A screenshot from the installer applet launched as an application.
In order to run such an unsigned applet, we have three choices:
•Signing the JAR file containing the applet with the jarsigner tool if you own a valid
certificate provided by some well-known certificate authority.
• Another option is to modify the policy file or provide your own, invoking the Java inter-
preter with the following command line option, for example:
- Djava.security.policy=<full path to new policy file>
Otherwise, the simplest thing to do (and the most potentially dangerous) is to modify the
java.policy default policy file (on Windows JREs under the path
<jre_home>/lib/security/ ); for example, adding the following line among the other
This solution (modifying the default policy file), apart from being potentially highly dan-
gerous, works only in limited situations and is infeasible for large client populations.
• Only for this applet, a main method has been added so that the same effect can be
achieved running the InstallerApplet as a Java application.
For more information on these topics, see the Java security FAQ or the SDK1.2
security trail in the Java Tutorial.
Another important piece is the HTML page, listed in Listing 7.7 below.