I have been working with Java Native Interface for sometime now.
Suddenly I saw the topic of Active Directory users.I am completely new to this area.
Can Someone tell me what is this about?
Thanks in Advance!!!!
Asked
Active
Viewed 305 times
1

Kasinaat 007
- 124
- 14
1 Answers
1
The simple way to talk to Active Directory is to use a Java LDAP library. This is covered by extensively in other Q&A's and off-site resources. For example:
Now to your specific question:
How to to get the properties of an AD user using JNI?
You could use JNI to access Active Directory. You would need to:
- Find a suitable native LDAP library.
- Implement your own LDAP API classes for Java, with native methods for calling the native library
- Write some C code to bridge the Java native calls to calls ro the native LDAP library (using JNI).
- Solve the extra build / test / deployment / portability problems that come with any native code project.
Once you have done that, use your shiny new API to issue the appropriate LDAP query.
In short: it could be done, but there is no real benefit in doing it.
Suggested read: The Law of the Instrument.

Stephen C
- 698,415
- 94
- 811
- 1,216