Running Applications and
Applets
There are several different types of Java applications and
application components that you can run using HPCJ. These
include:
- Database applications
- RMI applications
- Applets
These application and application components are discussed in
the following sections.
Running Database Applications

To run a
database application:
- First set the CLASSPATH environment variable
appropriately to contain the directories and DLLs that
comprise the application.
- Issue the following command (where executable is
the name of your executable):
executable
For example, if you earlier built a database application that
consisted of an executable named DB2Appl and
a compound DLL named DB2Driver.jll (to
contain your DB2 components), you could run the database
application in the following way:
- Prepare to run the executable by
issuing the following command to set the classpath:
set CLASSPATH=DB2Driver.jll;%CLASSPATH%
- Issue the following command to run
the executable:
db2appl
Running RMI Applications
To run an RMI application:
- Prepare to start the registry by ensuring that the
CLASSPATH environment variable contains the appropriate
directories and .zip or .jar files so that the registry
can find the bytecode classes for the stubs, skeletons,
and application. Note that since the registry is from the
JDK, the class files must be available on the system for
the registry to use, even though the compiled client and
server don't actually use them.
- Start the registry from the JDK.
- Run the server executable by doing one of the following:
- If the server is not compiled into native code,
then run it the way you normally would using a
Java virtual machine.
- If the server is compiled into native code using
HPCJ, then ensure that the CLASSPATH is set
appropriately to contain the directories and DLLs
that comprise the server, stubs and skeletons,
then simply run the executable. (You could also
use the hpjava command to run
DLLs.)
- Run the client executable by doing one of the following:
- If the client is not compiled into native code,
then run it the way you normally would using a
Java virtual machine.
- If the client is compiled into native code using
HPCJ, then ensure that the CLASSPATH is set
appropriately to contain the directories and DLLs
that comprise the client and the stubs, then
simply run the client executable. (You could also
use the hpjava command to run
DLLs.)
Running Applets
If you built an applet using HPCJ, you can only run the applet
within the context of an applet viewer. You cannot run it within
a Web browser.
To run an applet built as a compound DLL:
- First set the CLASSPATH environment variable
appropriately to contain the directories and DLLs that
comprise the application.
- Issue the following command to launch the applet viewer
(where htmlname is the name of the HTML file
that imbeds your applet):
hpjappletviewer htmlname
For example, if you earlier built an applet that consisted of
a compound DLL named MyApplet.jll,
and you created an HTML file named MyApplet.html to imbed your
applet, you could run your applet in the following way:
- Prepare to run the executable by
issuing the following command to set the classpath:

set
CLASSPATH=MyApplet.jll;%CLASSPATH%
- Issue the following command to
launch the applet viewer:
hpjappletviewer MyApplet.html


Java Executables and DLLs

Building Executables and DLLs

hpjava Command