This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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: 19651
    
  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
 
Similar Threads
WA #1.....word association
java and c++
add any application to the Context Menu when you right click on any Folder
Updating windows registry variables using Java program
Can java access Windows "file-properties-summary" ?