I know it’s possible to load a DLL (Windows library) in java.
And I know that a compiled java program runs anywhere..
Can a java program that loads a DLL run in a Unix environment ? (if the DLL file is present there)
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
No. A DLL runs native Windows instructions that are not compatible with a UNIX operating system. However shared libraries (.so) can be accessed using JNI.
To ensure a portable “Write once run anywhere” model, calls to native libraries should be avoided in favor of a pure Java implementation.