Re: Error loading shared library

From: jimw (no_spam_at_sofla.com)
Date: 05/24/04


Date: Sun, 23 May 2004 20:08:36 -0400


"Paul Sure" <phv_temp@yahoo.com> wrote in message
news:10b16r0s7c7km47@corp.supernews.com...
> Do a ldd on the library that gives the error and do a locate/find on the
> missing library. Next add the location to the SHLIB_PATH. BTW if your java
> is 64 bit you need to use LD_LIBRARY_PATH instead.
>
> Paul
>
> "jimw" <no_spam@sofla.com> wrote in message
> news:B28rc.16041$l%4.7954@bignews4.bellsouth.net...
> > I'm having a bit of difficulty loading the Java virtual machine
(although
> I
> > don't think this is a java problem).
> > I don't use HP-UX a whole lot, so bear with me please.
> >
> > I set my SHLIB_PATH as follows:
> > export
> >
>
SHLIB_PATH=/usr/java/jre/lib/PA_RISC/native_threads:/usr/java/jre/lib/PA_RIS
> > C:/usr/java/jre/lib/PA_RISC/classic:/opt/cs2/lib:.:::./
> >
> > Then I do a dlopen and dlsym of libjvm.sl, both of which work.
> > Then when I call to create the Java Virtual Machine (jvm) , I get an
error
> > message (in a callback routine) this error:
> > "Can't load library "/home/jww/src/libverify.sl", because specified
> library,
> > or one of its dependencies, does not exist."
> >
> > I think it's not because libverify.sl does have satisfied dependencies,
> but
> > because libverify.sl is NOT in /home/jww/src.
> > Why would it be looking there anyway?
> > It should have found it in one of the directories specified by
SHLIB_PATH
> > (/usr/java/jre/lib/PA_RISC).
> >
> > I am in /home/jww/src/mqpcjms directory when I start my program. How in
> the
> > world does it want to look in /home/jww/src for the library.
> >
> > Thanks,
> >
> > JimW
> >
> >
> >
>

I stumbled on something called LD_PRELOAD and I first tried setting this
LD_PRELOAD="/usr/java/jre/lib/PA_RISC/classic/libjvm.sl" and I immediately
got a bus error(coredump).

Soooo, then I set LD_PRELOAD="/usr/java/jre/lib/PA_RISC/libverify.sl" and
now it works. I assume that LD_PRELOAD tells the loader to pre-load this
library so that libjvm.sl doesn't have to look for it (actually, I think
libjvm.sl loads libjava.sl which in turn tries to load libverify.sl.

Hmmmmmmmmm.



Relevant Pages

  • Re: improving Java Applet performance
    ... Knute Johnson wrote: ... noticeable delay between the time the page loads and the applet ... I looked at this page with FF3 and IE7, neither gave any warnings or were slow. ... For the FF problem, while the applet is open, double click on the Java icon in your system and check the version. ...
    (comp.lang.java.programmer)
  • Re: [kde] konqueror problems
    ... still some sites (presumably depending a lot on java) do not work (e.g. ... Because in the second case I remember that some of the Google webapps had ... Here I get "applet loading", with the little coffee bean above it, then ... The java test applet loads ok, and one site, a weather site that uses ...
    (KDE)
  • Re: [kde] konqueror problems
    ... still some sites (presumably depending a lot on java) do not work (e.g. ... Because in the second case I remember that some of the Google webapps had ... Here I get "applet loading", with the little coffee bean above it, then ... The java test applet loads ok, and one site, a weather site that uses ...
    (KDE)
  • Re: How JVM is loaded in your program ?
    ... > Can anybody Please tell me that how JVM is loaded when you run a Java ... you fire up java.exe, like any large Windows program it loads some ... and then it loads your class file. ...
    (comp.lang.java.programmer)
  • Re: thanks once again to michael and louise :)
    ... Firefox and today Java crashed Firefox so badly I had to reboot the ... thread - which means firefox freezes while the program loads. ... then it crashes it. ...
    (sci.lang.japan)