Finding jnilib on Xcode (that's linked to dylib file)
Finding jnilib on Xcode (that's linked to dylib file)
- Subject: Finding jnilib on Xcode (that's linked to dylib file)
- From: "Inge Yuwono" <email@hidden>
- Date: Thu, 5 Oct 2006 15:49:50 -0500
I know there're many sites dedicated to JNI already. I followed this example:
http://developer.apple.com/java/jniuniversal.htmlto develop a Java application w/ C code. This C function, linked to a dylib, was compiled into jnilib.
I could succesfully created a jnilib file and compiled the Java code into a small Java application (universal).
In the link above, there's no instruction to specify the java.library.path by adding option -D to jvm.
[JavaAppLauncher Error] CallStaticVoidMethod() threw an exception
Exception in thread "main" java.lang.UnsatisfiedLinkError: /Users/inge/Documents/NetBeansProjects/ImageViewer/build/Release/libImageDecompressor.jnilib:
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668)
at java.lang.Runtime.loadLibrary0
(Runtime.java:822)
at java.lang.System.loadLibrary(System.java:992)
at ImageViewer.<clinit>(ImageViewer.java:43)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java
:242)
at apple.launcher.LaunchRunner.loadMainMethod(LaunchRunner.java:55)
at apple.launcher.LaunchRunner.run(LaunchRunner.java:84)
at apple.launcher.LaunchRunner.callMain(LaunchRunner.java:50)
at
apple.launcher.JavaApplicationLauncher.launch(JavaApplicationLauncher.java:52)
It is really weird because the jnilib is present in that folder (/Users/inge/Documents/NetBeansProjects/ImageViewer/build/Release/).
What setting do I need to do so that the application could find the jnilib?
Thanks,
Inge
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden