Re: IBM JVM: loading two native libraries in JNI, second one has problems

From: Joel Beach (sa_angreal_at_hotmail.com)
Date: 11/13/03


Date: Thu, 13 Nov 2003 13:30:35 GMT

Alex Hunsley wrote:

> I've refined my problem using JNI under IBM's JVM1.4.1 (in Linux) to the
> following scenario:
>

<snip>

>
> p.s. the native library files (.so files) are loaded due to the
> following static section in classes X and Y:
>
>
> static
> {
> try
> {
> System.loadLibrary("myLibrary");
> }
> catch(UnsatisfiedLinkError unsatisfiedlinkerror)
> {
> System.err.println("myLibrary was not found.\n\n");
> unsatisfiedlinkerror.printStackTrace();
> }
> }

Aren't you loading the same library ("myLibrary") twice then? Once
when class X is loaded and once when class Y is loaded. It is up
to the programmer to ensure that a native library is only loaded
once.

Joel



Relevant Pages

  • Re: Absence of Canines in Apiths
    ... >> being honest you would have at least acknowledged that your scenario ... Strange comment since I'm the one saying hominids have been conducting war ... >> the most primitive form of hominid capitalism. ...
    (sci.anthropology.paleo)
  • Re: Need a sample app like this... (ASAP!)
    ... towards developing a small desktop photo processing ... > loading each picture for the user to manually review and adjust ...
    (microsoft.public.win32.programmer.gdi)
  • Re: ReW: Spam and NDR
    ... my *opinion*. ... >>was presenting a scenario for others to look at. ... > MCSE+I, Exchange MVP ...
    (microsoft.public.exchange.admin)
  • Re: NFS broken with V8.2 upgrade (& ODS-5 system disk)
    ... It happened to me after upgrading to 8.2, but I can't say that it was ... because I upgraded TCP/IP at the same time. ... sure that after upgrading to 8.3, I was getting INSFMEM on loading the ...
    (comp.os.vms)
  • Re: Increment operator
    ... I understand completely about the repeated indices. ... twice, but will do the same thing as if it was there twice, warts and ... including evaluating twice unless you know that ...
    (comp.soft-sys.matlab)