Kalay
April 22nd, 2008, 12:30 PM
i use fedora8 and am trying to design a gui for my c program in java using jni and have been following the suns tutorial .First of all i tried a simple thing calling my c function from java program.finally when i was about to execute the program i came across the following problem:
Exception in thread "main" java.lang.UnsatisfiedLinkError: no HelloWorld in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1700)
at java.lang.Runtime.loadLibrary0(Runtime.java:841)
at java.lang.System.loadLibrary(System.java:1067)
at HelloWorld.<clinit>(HelloWorld.java:7)
Error: Could not find the main class.
Error: A JNI error has occurred, please check your installation and try again
the tutorial that i followed
http://java.sun.com/docs/books/jni/html/start.html
after this i tried to set my java.library.path using java -Djava.library.path=/home/user/....... (the path of my directory having the shared library)
but it didnt work
Help me out
Exception in thread "main" java.lang.UnsatisfiedLinkError: no HelloWorld in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1700)
at java.lang.Runtime.loadLibrary0(Runtime.java:841)
at java.lang.System.loadLibrary(System.java:1067)
at HelloWorld.<clinit>(HelloWorld.java:7)
Error: Could not find the main class.
Error: A JNI error has occurred, please check your installation and try again
the tutorial that i followed
http://java.sun.com/docs/books/jni/html/start.html
after this i tried to set my java.library.path using java -Djava.library.path=/home/user/....... (the path of my directory having the shared library)
but it didnt work
Help me out