public void modifydn(String dn,String attributes) throws NamingException {
  DirContext ctx=new InitialDirContext(env);
  ctx.rename(dn,attributes);
  ctx.close();
}

public void modifydn ( String dn , String attributes ) throws NamingException { DirContext ctx = new InitialDirContext ( env ) ; ctx . rename ( dn , attributes ) ; ctx . close ( ) ; }
modifies distinguished name attribute for ldap entries on ldap server
