You need to call modify method on LDAPConnection class :-)
From the javadocs:
public void modify(java.lang.String
DN,
LDAPModification mod)
throws LDAPException Makes a single change to an existing entry
in the directory (for example, changes
the value of an attribute, adds a new
attribute value, or removes an
existing attribute value). Use the
LDAPModification object to specify the
change to make and the LDAPAttribute
object to specify the attribute value
to change. The LDAPModification object
allows you add an attribute value,
change an attibute value, or remove an
attribute value.
For example, the following section of
code changes Barbara Jensen's email
address in the directory to
[email protected].
Example code from javadocs:
String myEntryDN = "cn=Barbara Jensen,ou=Product Development,o=Ace Industry,c=US";
LDAPAttribute attrEmail = new LDAPAttribute( "mail", "[email protected]" );
LDAPModification singleChange = new LDAPModification( LDAPModification.REPLACE, attrEmail );
myConn.modify( myEntryDN, singleChange );
This sample is for removing one value of one of your entry's attributes. You need to delete all values :-)