• Post Reply Bookmark Topic Watch Topic
  • New Topic

JNI under Linux  RSS feed

 
Chris Shepherd
Ranch Hand
Posts: 286
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to prove a simple java call to a library file compiled in C. I have both the java class file(which includes main) and the library file in the same directory. The problem is that I keep getting an UnsatisfiedLinkError claiming it can't find the library file. I have tried setting the java.library.path in the java call, but it doesn't seem to make any difference. I'v tried setting it to "=." and I've tried setting it to the complete path. Neither seems to work.
My library file is called "libTB4H.so". Does the extension matter under linux? All the JNI I have done before was under Windows. What permissions are required for a lib file? Do I need to include the extention in the loadLibrary call I make?
Any help or pointers would be greatly appreciated.
Thanks
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!