aspose file tools*
The moose likes Other JSE/JEE APIs and the fly likes jni help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "jni help" Watch "jni help" New topic
Author

jni help

Murali Jaya Rao
Ranch Hand

Joined: Jun 10, 2007
Posts: 43
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

Joined: Oct 30, 2001
Posts: 1970
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?


Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19670
    
  18

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?


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: jni help