Running DLLs with the hpjava Command

The hpjava command is used to load and run DLLs. You can use the hpjava command options and arguments to control run-time activities. The hpjava command is similar to the JDK java command. It is used to load and run an application program using the HPCJ-supplied VM. In this page, the following topics are discussed:

Syntax

hpjava [run-time_options] classname [user_program_arguments]

Options and Input Files
In the following table, the options for the hpjava command are loosely grouped according to their function. The table also provides a list of input files that you can specify as arguments for the hpjava command options. Detailed information about the command options and acceptable input files is found in the topic hpjava Command. Additional information about executables and DLLs is found in the topic Java Executables and DLLs.

Option Function Option Name
Class Selection -classpath path
-load DLL_files (either .jlc or .jll)
Miscellaneous -Dname=value
-help or -?
-v
[:class]
-version
-X
-Xfastmath
-Xss
size

To run a DLL:

  1. Specify the hpjava command and the name of the DLL (mandatory).
  2. Specify one or more of the Class Selection options and associated input file arguments (optional).
  3. Specify the name of the class containing the main() method.
  4. Specify one or more Miscellaneous options (optional).

Example:

In this example, the class MyClass is located in the compound DLL MyAppl.jll:

hpjava -classpath . -load MyAppl.jll MyClass OPT1 OPT2 OPT3

In this example, the -classpath option is specified to override and set the classpath setting to the current working directory. The -load option is specified to preload the compound DLL MyAppl.jll, which contains the MyClass class. Execution begins within the main() method of the MyClass class. The options OPT1, OPT2 and OPT3 are supplied as arguments to this method.

 


Java Executables and DLLs


Running Executables


hpjava Command