File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Distributed Java and the fly likes RMI vs JNI problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "RMI vs JNI problem" Watch "RMI vs JNI problem" New topic

RMI vs JNI problem

wip siva
Ranch Hand

Joined: Nov 03, 2000
Posts: 36
hi friends.
i am calling a simple c function from java.i created a .so file
from some othere m/c.and i copied all necessary files.while
starting the rmi registry.its trying to load the library.i am getting the follwoing exceptions.
plz let me know the problem.
thanx in advance
Exception in thread "main" java.lang.UnsatisfiedLinkError: no my_lib in java.lib
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.fillInStackTrace(Compiled Code)
at java.lang.Throwable.<init>(Compiled Code)
at java.lang.Error.<init>(
at java.lang.LinkageError.<init>(
at java.lang.UnsatisfiedLinkError.<init>(
at java.lang.ClassLoader.loadLibrary(Compiled Code)
at java.lang.Runtime.loadLibrary0(
at java.lang.System.loadLibrary(
at <Unloaded Method>
at com.wipro.osssmart.config.MainServer.main(
Aleksey Matiychenko
Ranch Hand

Joined: Apr 03, 2001
Posts: 178
First of all check your LD_LIBRARY_PATH.
The naming convention on UNIX is lib(libraryname).so so make sure that your library is named correctly.
Also do ldd -r This would tell you if you have unsatisfied links within the library
wip siva
Ranch Hand

Joined: Nov 03, 2000
Posts: 36
hi friend
thanx for ur reply.
i have set LD_LIBRARY_PATH also.i am working on solaris.
now its not giving this problem while starting the rmiregistry.
now its giving while calling the native function from my GUI.
like java.rmi.server error
and unsatisfiedlinkerror
plz help me in this.
i am in a critical situation
wip siva
Ranch Hand

Joined: Nov 03, 2000
Posts: 36
hi friend
i did ldd -r
its giving like this
warning: ldd: is not executable
symbol not found: printf (./
symbol not found: system (./
wheather the .so file should be in executable mode or what
this is from solaris m/c
plz let me know
I agree. Here's the link:
subject: RMI vs JNI problem
It's not a secret anymore!