Building the Java byte code

Perform these steps to compile a Java™ source file.

Procedure

  1. 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
  2. Change to the directory that contains the source code file of the program you want to compile.
  3. Issue this command to compile a Java source code file <program>.java:
    javac -classpath <fullpath>/CNM.jar <program>.java

    where <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.java
    If 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>.java
    Tip: Instead of using the -classpath option, you can set the CLASSPATH variable to point to CNM.jar and, if required, CNMMK.jar.