LD_LIBRARY_PATH problem

LD_LIBRARY_PATH problem

Post by xb.. » Tue, 12 Sep 2000 19:57:33



Hi all,

I developed a Java application and I created a libShmMem.so using
C program and JNI(Java Native Interface). In my Java application I am
using System.loadLibrary("ShmMem") to load the .so lib and I am calling
the native methods which are in libShmMem.so. In command line I set
LD_LIBRARY_PATH=<the libShmMem.so file path> and I ran the program, it
is working fine.

I want to run the same in the Netscape Browser using Javascript, the way
in which I am running other Java applications using Javascript in
Netscape Browser. Netscape browser is not taking the LD_LIBRARY_PATH and
not able to load the .so file (based on the exception I am guessing).
Even I put the LD_LIBRARY_PATH in /etc/profile and rebooted and I
checked using "set" command, and ran the program, it is not working.
Also I put the .so file in /usr/lib dir., netscape is not taking that
lib.

I want to know, the way how netscape is loading other .so or .o libs. If
I follow the same way to load my .so, it may work for me.

Please treat it as an urgent, and could you please tell me What I need
to do.

Thanks in advance,

Xavier Babu

Sent via Deja.com http://www.deja.com/
Before you buy.

 
 
 

LD_LIBRARY_PATH problem

Post by Karl Heye » Wed, 13 Sep 2000 10:12:55



> Hi all,

> I developed a Java application and I created a libShmMem.so using
> C program and JNI(Java Native Interface). In my Java application I am
> using System.loadLibrary("ShmMem") to load the .so lib and I am calling
> the native methods which are in libShmMem.so. In command line I set
> LD_LIBRARY_PATH=<the libShmMem.so file path> and I ran the program, it
> is working fine.

> I want to run the same in the Netscape Browser using Javascript, the way
> in which I am running other Java applications using Javascript in
> Netscape Browser. Netscape browser is not taking the LD_LIBRARY_PATH and
> not able to load the .so file (based on the exception I am guessing).
> Even I put the LD_LIBRARY_PATH in /etc/profile and rebooted and I
> checked using "set" command, and ran the program, it is not working.
> Also I put the .so file in /usr/lib dir., netscape is not taking that
> lib.

> I want to know, the way how netscape is loading other .so or .o libs. If
> I follow the same way to load my .so, it may work for me.

How are you invoking netscape.  If the command that run run is a reference
to a shell script (on mine its /usr/bin/netscape) then the environment
variable is being overridden.  

make sure by using the env command,  theres a difference between
set variables and environment variables.

sh:    ZZZ=wibble; export WIBBLE
csh:   setenv ZZZ wibble

karl

 
 
 

LD_LIBRARY_PATH problem

Post by xb.. » Thu, 14 Sep 2000 00:00:24


Hi Karl,

I am running netscape from /usr/local/netscape
directory
/usr/local/netscape/netscape  <html file>
The html file which is a javascript, is going to
run the Java application.

I tried with set env also. It is not working.
I copied the .so file into /usr/lib dir. also. no use.

Thanks

Babu




> > Hi all,

> > I developed a Java application and I created a libShmMem.so using
> > C program and JNI(Java Native Interface). In my Java application I
am
> > using System.loadLibrary("ShmMem") to load the .so lib and I am
calling
> > the native methods which are in libShmMem.so. In command line I set
> > LD_LIBRARY_PATH=<the libShmMem.so file path> and I ran the program,
it
> > is working fine.

> > I want to run the same in the Netscape Browser using Javascript, the
way
> > in which I am running other Java applications using Javascript in
> > Netscape Browser. Netscape browser is not taking the LD_LIBRARY_PATH
and
> > not able to load the .so file (based on the exception I am
guessing).
> > Even I put the LD_LIBRARY_PATH in /etc/profile and rebooted and I
> > checked using "set" command, and ran the program, it is not working.
> > Also I put the .so file in /usr/lib dir., netscape is not taking
that
> > lib.

> > I want to know, the way how netscape is loading other .so or .o
libs. If
> > I follow the same way to load my .so, it may work for me.

> How are you invoking netscape.  If the command that run run is a
reference
> to a shell script (on mine its /usr/bin/netscape) then the environment
> variable is being overridden.

> make sure by using the env command,  theres a difference between
> set variables and environment variables.

> sh:    ZZZ=wibble; export WIBBLE
> csh:   setenv ZZZ wibble

> karl

Sent via Deja.com http://www.deja.com/
Before you buy.
 
 
 

LD_LIBRARY_PATH problem

Post by Karl Heye » Thu, 14 Sep 2000 05:00:58



> Hi Karl,

> I am running netscape from /usr/local/netscape directory
> /usr/local/netscape/netscape  <html file>
> The html file which is a javascript, is going to run the Java application.

> I tried with set env also. It is not working. I copied the .so file into
> /usr/lib dir. also. no use.

check the permissions, try chmod 755.   is /usr/local/netscape/netscape a
shell script. If it is it may redefine the LD_LIBRARY_PATH.

other than that try strace to see what files its looking for.

karl

 
 
 

1. LD_LIBRARY_PATH problem under Linux

Hi,

I have install the REDHAT4.1 release of linux.
Now I want to compile a c-program with X libraries.
First I set the LD_LIBRARY_PATH=/usr/openwin/lib:/usr/X11R6/lib
Now I compile the program as follow

cc f1.c f2.c f3.c -lm -lxview -loglx -lX11 -o f

And I get the followin error

ld :cannot open -lxview: No such file or directory

If I compile the progrom with -L/usr/openwin/lin -L/usr/X11R6/lib then
everythings works fine.

Can someone tell me what I doing wrong

Regards,

Chris Herssens


2. slackware out of the box - security issues

3. LD_LIBRARY_PATH problem

4. pkgadd and permission problems

5. LD_LIBRARY_PATH Problem..

6. xinit:error in loading shared libs HELP!

7. LD_LIBRARY_PATH problem under Linux

8. Webcam Help!

9. LD_LIBRARY_PATH problem

10. Free Desktop WorkSpot.com and LD_LIBRARY_PATH problem

11. LD_LIBRARY_PATH problem