I have to create a custom Object Class in LDAP server from java JNDI. The object class should have 3 fields with values: Name, OID, Description. So far I have managed to only define the environment.
Properties properties = new Properties();
properties.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
properties.put(Context.PROVIDER_URL, ldapUrl);
properties.put(Context.REFERRAL, "ignore");
properties.put(Context.SECURITY_PRINCIPAL, dirManagerUser);
properties.put(Context.SECURITY_CREDENTIALS, password);
DirContext ctx = new InitialDirContext(properties);
//NEW CUSTOM OBJECT CREATION SHOULD GO HERE
ctx.close();