Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

error compiling JNI test programme.  RSS feed

 
zius oram
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello all,
i am using redhat linux, i compiled HelloNative.java, generated .h file, generated shared library till here it is fine, but when i compile HelloNativeTest.java file it is giving me Error at line


i have included my directory(named jni) to lib path as LD_LIBRARY_PATH=.:/root/jni
 
Rob Spoor
Sheriff
Posts: 20895
81
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The problem is not related to JNI. It's a Java class it can't find.
Are HelloNative.class and HelloNativeTest.class in the same directory? If not, you have to set the classpath properly.
 
zius oram
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you sir,
i got it working. it was classpath.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!