appletviewer

Name

appletviewer reads or downloads one or more HTML documents
specified by filename or URL on the command line. It reads
or downloads all
the applets referenced in each document and displays them,
each in their own window. If none of the named documents
has an <APPLET> tag, appletviewer does
nothing.

If this option is specified, the appletviewer is
started within jdb (the Java debugger). This allows
you to debug the applets referenced by the document or
documents.

-Jjavaoption

This option passes the following javaoption as a
command-line argument to the Java interpreter. The
specified javaoption should not contain spaces. If
a multi-word option must be passed to the Java interpreter,
multiple -J options should be used. See java
for a list of valid Java interpreter options. Available in
JDK 1.1 and later.

-encodingenc

This option specifies the character encoding that
appletviewer should use when reading the contents of
the specified files or URLs. It is used in the
conversion of applet parameter values to Unicode.
Available in JDK 1.1 and later.

When it starts up, appletviewer reads property
definitions from the file ~/.hotjava/properties (UNIX)
or the .hotjava\properties file relative to the
HOME environment variable (Windows). These
properties are stored in the system properties list and are
used to specify the various error and status messages the
applet viewer displays, as well as its security policies and
use of proxy servers. The properties that affect security
and proxies are described below.

The following properties specify the security restrictions
that appletviewer places on untrusted applets:

acl.read

This is a list of files and directories that an untrusted applet is
allowed to read. The elements of the list should be
separated with colons on UNIX systems and semicolons on
Windows systems. On UNIX systems, the ~ character
is replaced with the home directory of the current user. If
the plus character appears as an element in the list,
it is replaced by the value of the
acl.read.default property. This provides an easy
way to enable read access--by simply setting
acl.read to "+". By default, untrusted applets are
not allowed to read any files or directories.

acl.read.default

This is a list of files and directories that are readable by
untrusted applets if the acl.read property contains
a plus character.

acl.write

This is a list of files and directories that an untrusted applet is
allowed to write to. The elements of the list should be
separated with colons on UNIX systems and semicolons on
Windows systems. On UNIX systems, the ~ character
is replaced with the home directory of the current user. If
the plus character appears as an element in the list,
it is replaced by the value of the
acl.write.default property. This provides an easy
way to enable write access--by simply setting
acl.write to "+". By default, untrusted applets are
not allowed to write to any files or directories.

acl.write.default

This is a list of files and directories that are writable by
untrusted applets if the acl.write property contains
a plus character.

appletviewer.security.mode

This property specifies the types of network access an
untrusted applet is allowed to perform. If it is set to
"none", then the applet can perform no networking at all.
The value "host" is the default, and specifies that the
applet can connect only to the host from which it was
loaded. The value "unrestricted" specifies that an applet
may connect to any host without restrictions.

package.restrict.access.package-prefix

Properties of this form may be set to true to prevent
untrusted applets from using classes in any package that
has the specified package name prefix as the first component
of its name. For example, to prevent applets from using any
of the Sun classes (such as the Java compiler and the
appletviewer itself) that are shipped with the JDK, you
could specify the following property:

package.restrict.access.sun=true

appletviewer sets this property to true by
default for the sun.* and netscape.*
packages.

package.restrict.definition.package-prefix

Properties of this form may be set to true to prevent
untrusted applets from defining classes in a package that
has the specified package name prefix as the first component
of its name. For example, to prevent an applet from
defining classes in any of the standard Java packages, you
could specify the following property:

package.restrict.definition.java=true

appletviewer sets this property to true by
default for the java.*, sun.*, and
netscape.* packages.

property.applet

When a property of this form is set to true in Java
1.1, it specifies that an applet should be allowed to read
the property named property from the system
properties list. By default, applets are only allowed to
read ten standard system properties (see Chapter 14, System Properties, for a list). For example, to allow
an applet to read the user.home property, specify a
property of the form

Specifies an ordered list (colon-separated on UNIX,
semicolon-separated on Windows systems) of directories and
ZIP files in which appletviewer should look for class
definitions. When a path is specified with this environment
variable, appletviewer always implicitly appends the
location of the system classes to the end of the path. If
this environment variable is not specified, the default path
is the current directory and the system classes. Note that
appletviewer does not support the -classpath
command-line argument, except indirectly through the
-J option.