Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Loading Java natives libraries in Tiger
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Loading Java natives libraries in Tiger



Hi,
you may try to load the lib with explicit path and name, so that you're sure it's a path problem or a lib problem.



String lib = new File("path",System.mapLibraryName("myLib")).getAbsolutePath();
System.out.println("Will load jni lib="+lib);
System.load(lib);


Chris


Stéphane Letz wrote:


Le 20 sept. 05 à 10:06, Josef Henryson a écrit :

Hi,

What does your output say? Do you get any exceptions or other error messages? The /applications/Utilities/Console usually give you the output if not found elsewhere.

I had many different type of errors/reasons why my native librariies does not load, but without any further information it's hard to help you.

Cheers, Josef

On Sep 14, 2005, at 13:30 , Stéphane Letz wrote:


I get this:

lib path = /Developer/qt/lib::.:/Users/letz/Library/Java/Extensions:/ Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/ java (printed by my code...)

java.lang.UnsatisfiedLinkError: no JMidi in java.library.path
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1517)
        at java.lang.Runtime.loadLibrary0(Runtime.java:788)
        at java.lang.System.loadLibrary(System.java:834)
        at grame.midishare.Midi.Share(Midi.java:1320)

Stephane Letz



Hi,

Our Java natives libraries do not load anymore on OSX 10.4 Tiger. More precisely the Java classes that define native entry points can be used but the native library refuse to load (using the System.loadLibrary function)

Our natives libraries were placed in the /usr/lib/java directory by the installer and this was working OK on all previous OSX version.

I've checked the Java  "java.library.path" value which gives:

/Developer/qt/lib::.:/Users/letz/Library/Java/Extensions:/Library/ Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java

So everything seems correct (java.library.path is the same on  Panther)

I've try to move our native library in other possible places like / Library/Java/Extensions but without success....

Anyone here with a solution?

Thanks

Stephane Letz


_______________________________________________ Do not post admin requests to the list. They will be ignored. Java-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden





_______________________________________________ Do not post admin requests to the list. They will be ignored. Java-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden



_______________________________________________ Do not post admin requests to the list. They will be ignored. Java-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Loading Java natives libraries in Tiger (From: Stéphane Letz <email@hidden>)
 >Re: Loading Java natives libraries in Tiger (From: Josef Henryson <email@hidden>)
 >Re: Loading Java natives libraries in Tiger (From: Stéphane Letz <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.