I would like a little guidance with regards to a JNI issue. I currently have some functionality that exists in a DLL which I wish to incorporate into a JBoss logoin module that I'm writting.
I have got the JNI wrapper working on my current system outside of JBoss, but not in JBoss. For some reason JBoss fails to load the dll in a way that the class can link to, producing a linkage error.
java.lang.UnsatisfiedLinkError from \java\j2sdk1.4.0_01\jre\lib\rt.jar
The JNI class wrapper is called from a JBoss LoginModule
I'm using JBoss-3.0.4 with Jetty
I have seen previous posts which seem to suggest that the DLL should be of the java.library.path, which I have tried to accomplish using the different methods outlined below.
1) Referenced the dll in the PATH env variable
2) Referenced the dll in the claspath variable of JBoss's bootstrap run.bat
3) Referenced the dll in JBoss's bootstrap run.bat as -Djava.path.library=path
4) Placed the dll in the same directory as the class wrapper
I managed to get the DLL to load in the end. All that it needed was for the DLL to be placed in the bin directory.
It would appear though that referencing a DLL through other means fails, ie placing it in the PATH env variable or explicitly declaring it in the java.library.path property.