Sun Java System Access Manager 7.1 Developer's Guide

ProcedureTo Compile and Execute the Java API Samples

  1. In the Makefile, modify the following variables as necessary to suit your Access Manager installation:

    BASE_DIR: Enter the path to the directory where Access Manager is installed.

    JAVA_HOME: Enter the path to the directory where the Java compiler is installed.

    DOMAIN: Enter the name of the organization to login to.

    SHARE_LIB: Enter the path to the directory where Access Manager jar files are stored.

    JSS_JAR_PATH: Enter the path to the directory where JSS jar files are stored.

    JSSPATH: Enter the path to the directory where JSS libraries are located.

  2. In the Certificate Sample Makefile only, modify the following as necessary:

    CERTNICKNAME: Enter the Certificate nickname.

    URL: Enter the Access Manger Server URL.

    PASSWORD: Enter the Certificate DB Password.

  3. Copy AMConfig.properties from Config_Directory in the Access Manager server installation to the client machine.

    (Note: For SSL check SSL Configuration Setup, step 2).

  4. In the Makefile, update the classpath to include the location of the newly created AMConfig.properties.

  5. In the client machine, create a directory named locale.

    Copy all the property files from the locale directory in the Access Manager server installation machine to the client machine. The locale directory on the server machine can be found under the Product_Directory.

  6. Update the classpath in the Makefile to include the location of newly created locale files.

  7. Include jaas.jar in your classpath if you are using a JDK version less than JDK1.4

  8. Compile the program.

    • On Solaris Sparc/x86, Linux, run the gmake command.

      • On Windows 2000, run the make command.

  9. Run the sample program.

    • On Solaris Sparc/x86 or Linux, run the following command: gmake run

      • On Windows 2000, run the following command: make run