This example reads an object's schema from the directory. try { // Get context containing class definitions for cn=Ted Geisel entry DirContext tedClasses = ctx.getSchemaClassDefinition("cn=Ted Geisel, ou=People"); // Enumerate class definitions NamingEnumeration enum = tedClasses.search("", null); while (enum.hasMore()) { DirContext entry = (DirContext)enum.next(); process(entry); } } catch (NamingException e) { }