UnsatisfiedLinkError: libawt.so: libXp.so.6: cannot open shared object file
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Bushra_Rahman
Posted On:   Saturday, May 22, 2004 08:04 PM

Hi, I am using JNI to connect a C program to a Java method which is supposed to read image files in PNG format. I am running the code on a parallel cluster running on Linux. I am using Java j2sdk1.4.2_03 on Red Hat Linux. When I run the Java method by itself, it runs perfectly reading and writing the image without any errors. However, when I run the run the Java Method through C via JNI, I am encountered with the following error: java.lang.UnsatisfiedLinkError: /usr/java/j2sdk1.4.2_03/jre/lib/i386/libawt.so: libXp.so.6: cannot open shared object file: No such file or directory The command that I am using to run the C program is : mpicc -I/usr/java/j2sdk1.4.2_03/include/linux -I/usr/java/j2sdk1.4.2_03/in   More>>

Hi,
I am using JNI to connect a C program to a Java method which is supposed to read image files in PNG format. I am running the code on a parallel cluster running on Linux. I am using Java j2sdk1.4.2_03 on Red Hat Linux.

When I run the Java method by itself, it runs perfectly reading and writing the image without any errors. However, when I run the run the Java Method through C via JNI, I am encountered with the following error:
java.lang.UnsatisfiedLinkError: /usr/java/j2sdk1.4.2_03/jre/lib/i386/libawt.so: libXp.so.6: cannot open shared object file: No such file or directory


The command that I am using to run the C program is :
mpicc -I/usr/java/j2sdk1.4.2_03/include/linux
-I/usr/java/j2sdk1.4.2_03/include -I/usr/X11R6/
-L/usr/java/j2sdk1.4.2_03/usr/java/j2sdk1.4.2_03/jre/lib/i386
-L/usr/java/j2sdk1.4.2_03/jre/lib/i386/server -ljvm
cpi.c -o cpi

The X11 libraries do exist on the Linux that I am running on. Howver, they seem not to be connecting somehow.

I would really appreciate any help in this matter. I have been stuck with this problem for the last 2 weeks without any solution. Any help would be great.

thanks,
Bushra "

   <<Less

Re: UnsatisfiedLinkError: libawt.so: libXp.so.6: cannot open shared object file

Posted By:   Christopher_Koenigsberg  
Posted On:   Sunday, May 23, 2004 08:33 AM

I think it needs to find a "libXp.so" either on the LD_LIBRARY_PATH or in a directory you add via a "-L", and the libXp.so also has to have the right version 6 (libXp.so.6) that it is linked to.


it's been a long time since I dealt with so's, but if I recall correctly, I think you link to a library, like libXp.so, and it uses the latest version currently available (e.g. libXp.so.6) at link time; and then later on when you run, there may be multiple versions available (e.g. maybe libXp.so.5, etc.), but it needs to find the one it was linked with.

About | Sitemap | Contact