Partially Compiling and Linking Executables or Compound DLLs

When you partially compile and link executables and compound DLLs using the hpj command, you minimally generate one object module and either one .exe or .jll file for a selected subset of classes that you specify using command options. At link time, the hpj command will include all of the object modules and not just those that have been compiled. Information about using the hpj command options to control your compilation activities is found in the topic Building Executables and DLLs.

  1. Specify the hpj command and either the -exe or the -jll option (mandatory).
  2. Specify one or more Class Selection options and associated input file arguments to indicate all of the classes that make up the executable or compound DLL (mandatory).
  3. Specify the -partial option on the parts that you want to compile (mandatory).
  4. Specify one or more Performance options to enhance the performance of your compiled code (optional).
  5. Specify the -g option to generate debugging information (optional).
  6. Specify the -list option to generate listing files (optional).
  7. Specify one of the Output options to indicate the output location of the code (optional).

Example:

hpj -jll -o Animator.jll -noc -nofollow Animator Animator2 -partial Animator

In this example, the -jll option instructs the compiler to build a compound DLL. The -o option specifies that the compound DLL is to be named Animator.jll. The -noc option instructs the compiler to perform linking. (Note that the -noc option is a default and does not actually need to be specified.) The -nofollow option instructs the compiler to ignore referenced classes and indicates that only the specified classes Animator and Animator2 comprise Animator.jll. The -partial option specifies that only the Animator class is to be compiled.

Both the Animator and Animator2 classes and a Class Selection option (-nofollow) are specified so that the same object code is generated for the Animator class as would be generated in a full build. At link time, all of the object modules based on the Class Selection option and the specified classes are linked. In the example, the object modules for both the Animator and Animator2 classes are linked.

Additional information about executables and DLLs is found in the topic Java Executables and DLLs.

 


Java Executables and DLLs


Building Executables and DLLs


hpj Command