When you compile and link simple DLLs using the hpj command, you minimally generate one object module and one .jlc file for each .class file. Information about using the hpj command options to control your compilation activities is found in the topic Building Executables and DLLs.
To compile and link simple DLLs:
Example 1:
hpj -jlc -O -nofollow Animator Animator2
In this example, the -jlc option instructs the compiler to build simple Java DLLs. The -O option instructs the compiler to build optimized code. The -nofollow option instructs the compiler to ignore referenced classes and only compile the specified Animator and Animator2 classes. Since one simple DLL is built for each specified class, the DLL files Animator.jlc and Animator2.jlc are generated.
Example 2:
hpj -jlc -O -follow Animator Animator2
In this example, the -jlc option instructs the compiler to build simple Java DLLs. The -O option instructs the compiler to build optimized code. The -follow option instructs the compiler to compile the class files Animator and Animator2, and all classes referenced by those classes, continuing recursively until all classes directly referenced within the application are found and compiled. The only exception is that the core Java classes supplied with HPCJ are not compiled. (Note that the -follow option is a default and does not actually need to be specified.) Since one simple DLL is built for each specified class, the DLL files Animator.jlc, Animator2.jlc, and Animator3.jlc are built. (The Animator2 class contains a reference to a class named Animator3.)
For performance reasons, compiling entire applications or entire packages into separate simple DLLs is generally not recommended. Instead, it is often preferable to compile classes into compound DLLs so that the run-time class search and DLL load times are reduced.