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
- Next message: Joel Beach: "Re: IBM JVM: loading two native libraries in JNI, second one has problems"
- Previous message: Tim Zhao: "Looking For Decent Java IDEs"
- In reply to: Alex Hunsley: "IBM JVM: loading two native libraries in JNI, second one has problems"
- Next in thread: Joel Beach: "Re: IBM JVM: loading two native libraries in JNI, second one has problems"
- Reply: Joel Beach: "Re: IBM JVM: loading two native libraries in JNI, second one has problems"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Next message: Joel Beach: "Re: IBM JVM: loading two native libraries in JNI, second one has problems"
- Previous message: Tim Zhao: "Looking For Decent Java IDEs"
- In reply to: Alex Hunsley: "IBM JVM: loading two native libraries in JNI, second one has problems"
- Next in thread: Joel Beach: "Re: IBM JVM: loading two native libraries in JNI, second one has problems"
- Reply: Joel Beach: "Re: IBM JVM: loading two native libraries in JNI, second one has problems"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|