orioncarrier
2008-04-18 04:54:47 UTC
Hi all,
I've googled, and scanned the posts, and can't seem to solve my problem.
I can't seem to get a JNI shared object library (.so) to load when I run my
Java application in Netbeans. But when I run the application from the
command line, it works just fine.
When running the application at the command line, I use the following
arguments and everything works fine (I have the libary loaded in {Project
Folder}/lib):
java -Djava.library.path={Project Path}/lib -jar dist/ateui.jar
In Netbeans, I have tried setting "Arguments" on the Run tab of Project
Properties to each of:
-Djava.library.path={Project Path}/build/classes/lib
-Djava.library.path={Project Path}/dist/lib
-Djava.library.path={Project Path}/lib
...making sure I have a copy of the native library in all three locations in
each case, and regardless, I get the following stack trace:
Exception in thread "main" java.lang.UnsatisfiedLinkError: no JniRpcLib in
java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682)
at java.lang.Runtime.loadLibrary0(Runtime.java:823)
at java.lang.System.loadLibrary(System.java:1030)
at gpGuiRpcConnection.<clinit>(gpGuiRpcConnection.java:106)
at ateui.main(ateui.java:178)
If there is something I am missing, I would greatly appreciate knowing, as I
have one week left in this job. :)
Thanks warmly,
Orion Carrier
I've googled, and scanned the posts, and can't seem to solve my problem.
I can't seem to get a JNI shared object library (.so) to load when I run my
Java application in Netbeans. But when I run the application from the
command line, it works just fine.
When running the application at the command line, I use the following
arguments and everything works fine (I have the libary loaded in {Project
Folder}/lib):
java -Djava.library.path={Project Path}/lib -jar dist/ateui.jar
In Netbeans, I have tried setting "Arguments" on the Run tab of Project
Properties to each of:
-Djava.library.path={Project Path}/build/classes/lib
-Djava.library.path={Project Path}/dist/lib
-Djava.library.path={Project Path}/lib
...making sure I have a copy of the native library in all three locations in
each case, and regardless, I get the following stack trace:
Exception in thread "main" java.lang.UnsatisfiedLinkError: no JniRpcLib in
java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682)
at java.lang.Runtime.loadLibrary0(Runtime.java:823)
at java.lang.System.loadLibrary(System.java:1030)
at gpGuiRpcConnection.<clinit>(gpGuiRpcConnection.java:106)
at ateui.main(ateui.java:178)
If there is something I am missing, I would greatly appreciate knowing, as I
have one week left in this job. :)
Thanks warmly,
Orion Carrier
--
View this message in context: http://www.nabble.com/Finding-Native-JNI-Library-in-Netbeans-tp16760154p16760154.html
Sent from the Netbeans - Users mailing list archive at Nabble.com.
View this message in context: http://www.nabble.com/Finding-Native-JNI-Library-in-Netbeans-tp16760154p16760154.html
Sent from the Netbeans - Users mailing list archive at Nabble.com.