LDAP Class Libraries for Java September 2001 Table of Contents 1.0 LDAP Class Libraries for Java 2.0 Dependencies 3.0 Installation 4.0 LDAPv2 and LDAPv3 Support 5.0 Building JLDAP 1.0 LDAP Class Libraries for Java LDAP (Lightweight Directory Access Protocol) is an emerging Internet standard for accessing directory information, allowing LDAP-enabled applications to access multiple directories. LDAP v3 supports such features as secure connections (through SSL and SASL), entry management, schema management, and LDAP controls and extensions for expanding LDAP's functionality. The LDAP Class Libraries for Java enables you to write applications to access, manage, update, and search for information stored in LDAP-aware directories. This version follows the IETF draft 15, a work in progress, of the Java Interface for LDAP. 2.0 Dependencies Building the Java LDAP API is dependent upon the following: - JDK 1.1.7 or higher. - A Sun compliant JSSE implementation, which you place in the directory /external/jsse/lib. If you obtain the libraries from the www.sun.com website, you will place three jar files in the external/jsse/lib directory as follows: external/jsse/lib/jcert.jar external/jsse/lib/jnet.jar external/jsse/lib/jsse.jar - The Ant build tool for Java. Ant was developed by the jakarta.apache.org project and can be obtained from their web site. We have build this system using Ant version 1.2 compiled on October 24 2000. The ant tool is placed in the following directory structure under the root of the source. external/ant/antdoc.html external/ant/LICENSE external/ant/bin external/ant/bin/ant external/ant/bin/ant.bat external/ant/bin/antRun external/ant/bin/antRun.bat external/ant/bin/lcp.bat external/ant/bin/runant.pl external/ant/lib/ant.jar external/ant/lib/jaxp.jar external/ant/lib/parser.jar Running an application that uses the LDAP Class Libraries for Java is dependent upon the following: - JRE 1.1.7 or higher. - JDK 1.2 Standard Edition or higher. Creating a Keystore file for SSL connections requires JDK 1.2 or higher. - A Sun compliant implementation of JSSE to create SSL connections. - The LDAP extensions for naming context and replica management require NDS eDirectory 8.5. 3.0 Installation To install the libraries do the following: 1. Run the build process outlined below. 2. Copy the ldap.jar file (either debug or release) to a directory of your choice on your platform. 3. Add the complete path, including the file name, of the ldap.jar file to your CLASSPATH. 4.0 LDAPv2 and LDAPv3 Support This version of the LDAP Class Libraries for Java supports LDAPv3. Since the consensus in the LDAP community is to encourage everyone to update to LDAPv3, there is no attempt to ensure that these libraries support LDAPv2 servers. 5.0 Building JLDAP JLDAP is built using a system developed by jakarta.apache.org called ANT. The build files are named "build.xml" and "javac.xml" and are found in the root directory of the Java LDAP source. To set up your environment for ANT, do the following: For Win32 Assuming this source directory on win32 is d:\jldap, and java is installed in d:\jdk1.3 then you set in your environment: set JAVA_HOME=d:\jdk1.3 set ANT_HOME=d:\jldap\external\ant PATH %ANT_HOME%\bin;%JAVA_HOME%\bin;%PATH% Note that your SYSTEM path variable (which gets prepended to the above path variable) should not already include the javac.exe compiler. For Linux / Unix Assuming the following: 1) A Linux system running bourne shell 2) The source directory is located in /work/jldap 3) The Java jdk is installed in /usr/local/jdk1.3 then export in your environment: ANT_HOME=/work/jldap/external/ant JAVA_HOME=/usr/local/jdk1.3 PATH="$ANT_HOME/bin:$JAVA_HOME/bin:$PATH" export ANT_HOME JAVA_HOME PATH To build everything just invoke ant as follows from the top of the source tree: ant all Targets available at the top of the source tree are: clean - Cleans all generated files and directories in this and subbordinate directories cleanpkg- Cleans pkg directory doc - Builds javadoc files debug - Builds debug classes and jar files release - Builds release classes and jar files lib - Builds debug & release classes and jar files. jar - Synonym for lib all - Builds everything possible. It will build in all directories - debug and release jar files, java doc, samples, test programs, and create an installation directory called pkg. install - Copies build results from all directories and creates the pkg directory. pkg - Synonym for install Targets available int the the ldap and novp directories are: clean - Cleans all generated files and directories in this and subbordinate directories doc - Builds javadoc files debug - Builds debug classes and jar files release - Builds release classes and jar files lib - Builds debug & release classes and jar files jar - Synonym for lib all - Builds everything possible in this directory It will build debug and release jar files, javadoc, samples, and test programs. Targets available int the the diretories containing java files are: clean - Cleans all generated class files compile - Builds debug classes and jar files all - Synonym for compile The following directories are created when "ant all" is run: Contents of directories in the ldap directory jldap/ldap/classes # Classes used to build lib/ldap.jar jldap/ldap/classes_debug # Classes used to build lib_debug/ldap.jar jldap/ldap/doc # Javadoc for all ldap.jar classes jldap/ldap/lib # Jar file for ldap - optimized, debug off jldap/ldap/lib_debug # Jar file for ldap - not optimized, debug on Contents of directories in the jldap/pkg directory jldap/pkg # Distribution directories and files jldap/pkg/doc # Javadoc for the Java LDAP API jldap/pkg/lib # Jar file for ldap - optimized, debug off jldap/pkg/lib_debug # Jar file for ldap - not optimized, debug on --- $OpenLDAP: pkg/jldap/README,v 1.9 2001/09/20 02:44:05 kurt Exp $