Search & Win   click me  

Installing Netscape Directory SDK for Java - (Version 4.1.7)

  Return to Netscape Directory Resources Home Page.


Introduction / Downloading

The Netscape Directory SDK 4.1 for Java provides programmers and developers with the tools to needed to develop directory-enabled software. The latest release of the Netscape Directory SDK for Java is 4.1.7 and can be downloaded from:

http://www.mozilla.org/directory/javasdk.html

This article provides the instructions for installing and configuring the Netscape Directory SDK for Java for the UNIX / Linux platform.

System Requirements
The following system requirements are for building and utilizing the Netscape Directory SDK for Java, version 4.1.7 on the UNIX / Linux platform:

Build Instructions
The following instructions are provided to build the SDK software:

  1. Download the latest version of the SDK Source Code. In this case, the file is named: ldapsdk_java_20020819.tar.gz.

  2. Uncompress and extract the source files by entering the following command (or your preferred variant of this command):
    # gzip -dc <filename>.tar.gz | tar -xvf -
    For example:
    # gzip -dc ldapsdk_java_20020819.tar.gz | tar -xvf -

  3. Set the following environment variables (JAVA_HOME, CLASSPATH, JAVA_VERSION, and MOZ_SRC). For example:
    JAVA_HOME=/usr/java
    CLASSPATH=.:/u01/app/oracle/product/9.2.0/jdbc/lib/ojdbc14.jar:/u01/app/oracle/product/9.2.0/lib/servlet.jar
    JAVA_VERSION=1.4
    MOZ_SRC=/u01/app/oracle/mozilla
    export JAVA_HOME CLASSPATH JAVA_VERSION MOZ_SRC

  4. Build the LDAP Java classes by entering the following commands:
    # cd mozilla/directory/java-sdk
    # gmake -f ldap.mk

  5. After you have made the LDAP Java Classes, you should also package all of the classes in a JAR file. To do this, specify "basepackage" as the target:
    # gmake -f ldap.mk basepackage

  6. (Optional) - To generate the javadoc, specify "doc" as the target:
    # gmake -f ldap.mk doc
    NOTE: If you are using JDK1.1, javadoc images will be missing and you'll need to copy those images from somewhere else into mozilla/directory/java-sdk/dist/doc/images. If you are using JDK1.2 you do not need to do that.

  7. The SDK will be built and copied into the following directories:

    • mozilla/directory/java-sdk/dist/classes - class files and manifest file
    • mozilla/directory/java-sdk/dist/packages - ldapjdk.jar JAR file (if you've specified "basepackage" as the target)
    • mozilla/directory/java-sdk/dist/doc - ldapjdk javadoc (if you've specified "doc" as the target)

  8. Build the JNDI LDAP Service Provider classes by entering the following commands:
    # gmake -f ldapsp.mk

  9. After you have made the JNDI LDAP Java Classes, you should also package all of the classes in a JAR file. To do this, specify "basepackage" as the target:
    # gmake -f ldapsp.mk basepackage

  10. (Optional) - To generate the javadoc for the JNDI LDAP Service Provider, specify "doc" as the target:
    # gmake -f ldapsp.mk doc

  11. The JNDI LDAP Service Provider will be built and copied into the following directories:

    • mozilla/directory/java-sdk/dist/classes - class files and manifest file
    • mozilla/directory/java-sdk/dist/packages - ldapsp.jar JAR file (if you've specified "basepackage" as the target)
    • mozilla/directory/java-sdk/dist/doc - ldapsp controls' javadoc (if you've specified "doc" as the target)
Configuration Instructions
After building the Netscape Directory SDK for Java (using the instructions above), the most important file is the JAR file for the SDK: "ldapjdk.jar". Simply put this JAR file in your CLASSPATH variable to start using the SDK.

For example:

# CLASSPATH=$JAVA_LIB/ldapjdk.jar:$CLASSPATH; export CLASSPATH



Last modified on: Saturday, 18-Sep-2010 17:23:17 EDT
Page Count: 19971