Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

UnsatisfiedLinkError's was JRex




I set up a simple test class

import java.io.File;

public class TestLoad {

	public static void main(String[] args) {
		try{
			System.load(new File(args[0]).getAbsolutePath());
		}catch(UnsatisfiedLinkError error)
		{
			error.printStackTrace();
		}
	}
	
}

that I'm running from the directory with the dylib's. With this some seem to work, some don't.
For example one that works...


java -cp . TestLoad libnspr4.dylib

trust me, comes back with no error.
This one doesn't work...

java -cp . TestLoad libplc4.dylib
java.lang.UnsatisfiedLinkError: /Users/mjh/mozilla/release/dist/ jrex_gre/libplc4.dylib:
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
etc.


I got this from a past post having the same problem as something that will list library dependencies...

otool -L libplc4.dylib
libplc4.dylib:
@executable_path/libplc4.dylib (compatibility version 1.0.0, current version 1.0.0)
@executable_path/libnspr4.dylib (compatibility version 1.0.0, current version 1.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.1.10)


So, itself, the existing and successfully loading libnspr4 and a system lib.
The past post seemed to have a pretty complex situation. This seems fairly simple, why doesn't it work?



Mike Hall hallmike at att dot net http://www.geocities.com/mik3hall http://sourceforge.net/projects/macnative



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden
References: 
 >JRex (From: Michael Hall <email@hidden>)



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

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.