I can think of few things I've done in the past years that were more rife with gotchya's than trying to authenticate against active directory. You can do it with
Java's
JNDI, but you need an administrator's account to authenticate your application with FIRST, then you can authenticate users. It's a pain. Searching the net I found someone had wrapped the Win32 api for authentication with a JNI wrapper and that worked much better. Try searching for it.