Java 2 Network Security



Java 2 Network Security
Figure 3. GetPrintJob.html File Invoking the GetPrintJob Applet
The applet source code shown in Figure 1 on page 14 and Figure 2 on page
15 can be
compiled by issuing the command:

javac GetPrintJob.java
which translates Java source code into Java bytecode. The resulting file
produced by the Java compiler

javac
is GetPrintJob.class.
1.4.1.2 Running the Applet without the Necessary Permission
After saving GetPrintJob.class and GetPrintJob.html in the public directory of
a Web server, having host name wtr05218.itso.ral.ibm.com, we try to access
the HTML file from a client machine using the Java 2 Applet Viewer. The
Applet Viewer is a development tool shipped with the SDK. The applet can be
invoked from a remote machine running Java 2 by entering the following
command:

appletviewer http://wtr05218.itso.ral.ibm.com/GetPrintJob.html
The Applet Viewer window with a getPrintJob button is immediately displayed:
<HTML>

<HEAD>
<TITLE>GetPrintJob Applet</TITLE>
</HEAD>

<BODY>

<H3>GetPrintJob Applet</H3>

<APPLET Code="GetPrintJob" Width=250 Height=50>
</APPLET>

</BODY>