Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / September 2005

Tip: Looking for answers? Try searching our database.

JNI Problem

Thread view: 
Marcelo - 29 Sep 2005 17:36 GMT
I would like to know what happens here....
In one computer (terminal) the program executes as normal, but in
another computer (terminal with ssh connection) it doesnt work anymore.
The message that I have is:

The library that I use for the JNI program is called libPrompt.so,
the command line that I use to compile this shared library is:
g++ Prompt.c -Wno-deprecated -shared -fpic -o libPrompt.so

Can anybody help me?

Exception in thread "main" java.lang.UnsatisfiedLinkError:
/home/mmfernan/workspace/Prompt/libPrompt.so:
/home/mmfernan/workspace/Prompt/libPrompt.so: cannot open shared object
file: No such file or directory        at
java.lang.ClassLoader$NativeLibrary.load(Native Method)
        at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751)
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1676)
        at java.lang.Runtime.loadLibrary0(Runtime.java:822)
        at java.lang.System.loadLibrary(System.java:992)
        at Prompt.<clinit>(Prompt.java:13)
Thomas Fritsch - 29 Sep 2005 18:01 GMT
> I would like to know what happens here....
[...]
> Exception in thread "main" java.lang.UnsatisfiedLinkError:
> /home/mmfernan/workspace/Prompt/libPrompt.so:
> /home/mmfernan/workspace/Prompt/libPrompt.so: cannot open shared object
> file: No such file or directory
>         at java.lang.ClassLoader$NativeLibrary.load(Native Method)
[...]
>         at Prompt.<clinit>(Prompt.java:13)
Your JVM searched for "libPrompt.so", but didn't find it.
You can check where the JVM actually looks for *.so libraries by doing
   System.out.println(System.getProperty("java.library.path");
somewhere in your code. You'll get a list of directories (separated by
":" on Linux/Unix, by ";" on Windows). You have to put your *.so library
into one of the directories given there.

Signature

"Thomas:Fritsch$ops:de".replace(':','.').replace('$','@')

Roedy Green - 29 Sep 2005 22:16 GMT
>java.lang.UnsatisfiedLinkError:

see http://mindprod.com/jgloss/caq.html
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.

Roedy Green - 29 Sep 2005 22:55 GMT
>The library that I use for the JNI program is called libPrompt.so,
>the command line that I use to compile this shared library is:
>g++ Prompt.c -Wno-deprecated -shared -fpic -o libPrompt.so

see http://mindprod.com/jgloss/jni.html#LOADLIBRARY
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.