Loading Native Library , problem + Solution
843802Dec 14 2001 — edited May 14 2002Hello All
I am using web start to run an application that uses a native rendering library. As usual with all the settings in place java VM gives the error message "Un Satisfied link error".
Here is what I found. I am working on the Windows platform. In the JNLP client machine the DLL's are stored in a directory called c:\program files\java web start\ .javaws\..\..\..\..\RN*.jar\*.dll. The problem is Java VM is pointed to the right place to load the dll, but clients system is not ready. The JNLP client must be configured in the environment path variable , so that it knows where the *.dll is.
On Windows when the system comes across a folder called .javaws I think it assumes it as a file and it does not recurse thro the sub directories to actually look for the dll.
I tried to put the dll in C:\program files\web start and the dll is loaded properly and if i put it any where else in the client system the application finds the dll. But if you put the .dll in the .javaws or any of its sub directories the System.loadlibrary fails. I think on UNIX or other operating systems a folder can be called .folder so this might work for other systems.
Therefore I would like to know if any one has had success loading native dll on windows platform (with out any manipulation like the above) and also I would like to know if SUN has tested this on windows platform?.
I would appreciated any comments and other solutions people have thought of for this. I see this question repeated every where (including the JNI group) and it would be good if sun put in some efffort to make this more user friendly.
Regards
Gowri