The javax.naming.ldap package contains classes and interfaces for using feature that are specific to the LDAPv3.
Most JNDI applications that use the LDAP will find the javax.naming.directory package sufficient and will not need to use the ldap package at all.
The ldap package is primarily used for those applications that need to use
"extended" operations, controls or notifications.
The LDAPContext interface represents a context for performing "extended" operations, sending request controls, and receiving response controls.
Source: http://docs.oracle.com/javase/tutorial/jndi/overview/dir.html
Most JNDI applications that use the LDAP will find the javax.naming.directory package sufficient and will not need to use the ldap package at all.
The ldap package is primarily used for those applications that need to use
"extended" operations, controls or notifications.
The LDAPContext interface represents a context for performing "extended" operations, sending request controls, and receiving response controls.
Source: http://docs.oracle.com/javase/tutorial/jndi/overview/dir.html