📅  最后修改于: 2022-03-11 14:52:20.193000             🧑  作者: Mango
String dn = "CN=Jimmy Blooptoop,OU=Someplace,OU=Employees,DC=Bloopsoft-Inc";
LdapName ln = new LdapName(dn);
for(Rdn rdn : ln.getRdns()) {
if(rdn.getType().equalsIgnoreCase("CN")) {
System.err.println("CN is: " + rdn.getValue());
break;
}
}