I have an idea of what this can do for this, but have not tested my theory yet.
Active Directory supports LDAP access, so perhaps you can use the JNDI and LDAP tutorials to access Active Directory.
Wikipedia Active Directory , , , your ( ) . Microsoft Windows, XP, .