Building the Java samples

Learn how to build the Java™ samples.

Procedure

  1. Configure your environment for Java:
    1. Set your JAVA_HOME environment variable and the Java bin directory:
      1. Set your JAVA_HOME environment variable to point to the directory in which the JDK is located.

        For example, if your JDK is set to /opt/java/j2sdk1.4.2, set JAVA_HOME to this path.

      2. Ensure your Java bin directory is included in your Path environment variable.
    2. If you are planning on using Ant to build the samples, set your ANT_HOME environment variable and Ant bin directory.
      1. Set your ANT_HOME to point to the directory in which you have installed Ant.
      2. Ensure your Ant bin directory is included in your Path environment variable.
  2. Build the Java sample client:
    1. Change to the conf directory under the directory in which you installed the IBM® Spectrum Symphony SDK.
    2. Set the environment:
      • For csh, enter:
        source $SOAM_HOME/conf/cshrc.soam
        
      • For bash, enter:
        . $SOAM_HOME/conf/profile.soam
        
    3. Compile with the Makefile or with the Ant build file.
      • Compile with the Makefile:
        Change to the $SOAM_HOME/7.3.2/samples/Java/SampleApp directory and run the command:
        make
        
      • Compile with the Ant build file:

        Change to the $SOAM_HOME/7.3.2/samples/Java/SampleApp directory and run the command:
        ant