JNI HELP

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
 
D

David

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,874
Messages
2,569,924
Members
46,176
Latest member
JeannineMe

Latest Threads

Top