Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jni help

 
Murali Jaya Rao
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI,

my issue is,am invoking a function written c from java using jni it compiles fine but at runtime i got an exception like

Exception in thread "main" java.lang.NoClassDefFoundError: com/jniwrapper/DefaultLibraryLoader
at Test.main(Test.java:15)
if possible please provide an example.
[ February 05, 2008: Message edited by: Bear Bibeault ]
 
Peter Chase
Ranch Hand
Posts: 1970
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A NoClassDefFoundError does not sound like a JNI problem. Sounds more like an ordinary Java classpath issue. Is your classpath at compile-time different to your classpath at run-time?
 
Rob Spoor
Sheriff
Pie
Posts: 20531
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Peter Chase:
A NoClassDefFoundError does not sound like a JNI problem. Sounds more like an ordinary Java classpath issue.

Well it could be.

Are you calling (*env)->FindClass(env, ...) somewhere? If so, what is the value of that class? Have you mistyped it?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic