java-dev
[Prev] Thread [Next] | [Prev] Date [Next]
Re: Xcode -> Java Native Interface -> Eclipse Greg Guerin Fri Jul 11 12:04:51 2008
Matthew Grivich wrote: >I exited Xcode, and put my .java file in the src/edu/salk/snl/micrimap. I >reopened Xcode and noticed that it had updated properly. I recompiled (no >build errors) and ran. I still get the UnsatisfiedLinkError. I also tried >moving Grabberjnilib.c to the same location. This time, I had to re-add the >file to the project. Otherwise it was the same. Successful build and >UnsatisfiedLinkError. Post the stack-trace of the UnsatisfiedLinkError. Also, where are the jar file and the jnilib file located when the error occurs? Finally, run the 'nm' command on the jnilib file (in Terminal): nm libYourNameHere.jnilib and post the output from that. >Also, the automatically generated Grabber.h does not include any package >information. That may be causing the problem. > The prototypes are of the form JNIEXPORT >jint JNICALL Java_Grabber_OpenCamera (JNIEnv *, jobject, jstring); That doesn't seem correct to me. JNI binds classes to C functions by name, and that name includes a package. >I don't know if this correct, but the >fact that the .jnilib works in Eclipse leads me to believe that it is. Can't tell. Insufficient information. For example, Eclipse might be working because it's using older class files and jnilibs. Can't tell unless you know exactly what files are in use when it works under Eclipse. You probably need to add diagnostic code that actually prints the entire class-name (anyObject.getClass()), so you can see whether you're using the class in the package or not. Other useful information is to print the java.class.path system property, along with the library path. Heck, just print every system property, since the extensions-dirs will also affect loading of libs. -- GG _______________________________________________ Do not post admin requests to the list. They will be ignored. Java-dev mailing list ([EMAIL PROTECTED]) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/java-dev/alexiscircle%40gmail.com This email sent to [EMAIL PROTECTED]
- Xcode -> Java Native Interface -> Eclipse Matthew Grivich
- Re: Xcode -> Java Native Interface -> Eclipse Michael Stringer
- Re: Xcode -> Java Native Interface -> Eclipse Matthew Grivich
- Re: Xcode -> Java Native Interface -> Eclipse Sandro Sabatini
- Re: Xcode -> Java Native Interface -> Eclipse Matthew Grivich
- Re: Xcode -> Java Native Interface -> Eclipse Moises Lejter
- Re: Xcode -> Java Native Interface -> Eclipse Greg Guerin <=
- Re: Xcode -> Java Native Interface -> Eclipse Matthew Grivich