I want to show all objectclasses present in schema of LDAP Directory to help user to input available objectclasses for adding new entry.
DirContext schema = ctx.getSchema("");
Attributes answer = schema.getAttributes("ClassDefinition/person");
but that shows information about person only.
You can use various other bindings like
Schema context may also provide bindings like
You have to query the subschema subentry i.e cn=schema (the below code has been tested against the Apache Directory Server)