Skip to Main Content

Java HotSpot Virtual Machine

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

java.lang.NoClassDefFoundError: org/apache/xmlbeans/XmlException

843829Jul 8 2005
Hi ,
I am having problem invoking a Javamethod from C/C++.

I get the following error :
java.lang.NoClassDefFoundError: org/apache/xmlbeans/XmlException
Exception in thread "main"
My main function is written in C. And my Java method uses xmlbeans (version 2.0.0) jar files to manipulate a XML file.
I thought it was a Classpath issue. I tried passing the classpath by setting
JavaVMOption options[1];
options[0].optionString = "-Djava.class.path=." , i tried setting the path here. I tried setting the path in classpath env. variable.

I tried setting the class path by using system property.
System.setProperty("java.class.path ", "C:\\xmlbeans\\xmlbeans-2.0.0\\lib;C:\\eclipse\\workspace\\parseXML;C:\\eclipse\\workspace\\javaJNI");

I even tried bringing the third party jar files xbean.jar ( which contains the XmlException class) and other required jar files.

It did not work. Can anyone help.

thanks,
Sanjay

p.s. I am using eclipse IDE. I tried using command line (DOS). It did not work.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 5 2005
Added on Jul 8 2005
0 comments
369 views