Building the Java byte code
Perform these steps to compile a Java™ source file.
Procedure
-
Ensure that your LD_LIBRARY_PATH variable points to the CCA libraries. This example points to the
default location:
export LD_LIBRARY_PATH=/usr/lib64 - Change to the directory that contains the source code file of the program you want to compile.
-
Issue this command to compile a Java source code file
<program>.java:
javac -classpath <fullpath>/CNM.jar <program>.javawhere <fullpath> is the location of CNM.jar.
The following example uses the default path and the sample program of Sample program in Java:javac -classpath /opt/IBM/CCA/cnm/CNM.jar RNGpk.javaIf the program uses the Master Key Process (CSNBMKP) verb, you must also include CNMMK.jar in the class path (see Using the Master Key Process (CSNBMKP) verb). Issue this command to compile such programs:javac -classpath <fullpath>/CNM.jar:<fullpath>/CNMMK.jar <program>.javaTip: Instead of using the -classpath option, you can set the CLASSPATH variable to point to CNM.jar and, if required, CNMMK.jar.