G
Gordon Beaton
im new to the jni and i need to learn it for my course. the problem
im having is getting it too work. even when using the examples given
on the java.sun website, it doesnt work. Whats happening is im
getting the error "Exception in thread 'main'
java.lang.UnsatisfiedLinkError: no hllo in java.library.path" and i
havent a clue whats wrong as im doing everything the site says. any
ideas anybody?
What is your operating system?
When you invoke System.loadLibrary("hllo"), the JVM attempts to load
libhllo.so or libhllo.sl (various unices) or hllo.dll (windows), and
expects to find it in one of the directories displayed by this:
System.out.println(System.getProperty("java.library.path"))
i.e. somewhere in your LD_LIBRARY_PATH (unices) or PATH (windows).
Make sure that the library has the right filename, that it's in the
right directory, and that you've specified the right "short name" in
the call to System.loadLibrary().
If the JVM still won't load the library, try using System.load()
instead, and specify the complete path and filename.
/gordon