Building Executables and DLLs

The hpj command is used to compile Java source files and bytecode into platform-specific executables and DLLs. In this page, the following topics are discussed:

Syntax

hpj [[options]...input-files]...

Options and Input Files
In the following table, the options for the hpj 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 hpj command or its options. Detailed information about the command options and acceptable input files is found in the topic hpj Command.

Option Function Option Name Input Files
     
Executable or DLL -exe
-jlc
-jll
file.java
classname
file
.class
file.jar
file.zip
file.o
file.obj
file.a
file.lib
@file
Class Selection -include prefix
-exclude prefix
-[no]follow
-classpath path
-main classname
-- arg
Performance -[no]O
-architecture arch
-tune arch
-compact
-maxmem size
-no maxmem
-spill size
Outputs -o file
-partial prefix
-[no]list
-d dir
-[no]c
-B option
-[no]collapse
Miscellaneous -[no]g
-help or -?

Understanding the -exe, -jlc, and -jll Options
When you run the hpj command to build an executable or DLL, you must specify one of the following options:

-exe
Instructs HPCJ to compile an executable from your specified Java source or class files. (The -exe option is the default selection and it is automatically specified if neither the -jlc or -jll option is specified.)
 
-jlc
Instructs HPCJ to compile simple DLLs from your specified Java source or class files. A simple DLL is produced for each of the classes selected for compilation.
 
-jll
Instructs HPCJ to compile a compound DLL from your specified Java source or class files.

Build Scenarios
There are many different build scenarios that you may follow in building your executables or DLLs. Regardless of the build scenario that you follow, you will always specify the -exe, -jlc, or -jll option. Generally, you will also specify other options to control things like the selection of input files. Some of the common build scenarios are:

 


Java Executables and DLLs


Compiling and Linking Executables or Compound DLLs
Compiling and Linking Simple DLLs
Partially Compiling Executables or Compound DLLs
Partially Compiling and Linking Executables or Compound DLLs
Linking Executables or Compound DLLs without Compiling


hpj Command