Java Naming and Directory Interface (JNDI) tutorials and examples.
Objects present in LDAP server could be manipulated by connecting with server. Also, you may require the authentication with server. For making connections with server get a reference of DirContext interface to an object. This is done with class InitialDirContext that would be taking hashtable.
Given code could be used for authentication and connection of user with LDAP server. It shall be noted that simpler authentications are used over here. Simpler kind of authentications include