That’s correct for a Unix system – maybe you’re running windows?  If so, then you need to change the colon to a semi-colon (technically, the slashes ought to be backslashes, but evidently the JRE can translate that).  For example:

 

C:\work>java -cp .:tools/lib/jibx-bind.jar org.jibx.binding.Compile

Exception in thread "main" java.lang.NoClassDefFoundError: org/jibx/binding/Comp

ile

 

C:\work>java -cp .;tools/lib/jibx-bind.jar org.jibx.binding.Compile

 

Usage: java org.jibx.binding.Compile [-b] [-l] [-v] binding1 binding2 ...

where:

 -b  turns on BCEL verification (debug option),

 -l  turns on test loading of modified or generated classes for validation, and

 -v  turns on verbose output

The bindingn files are different bindings to be compiled.

 

If you are on Unix or Linux the trailing slash in the the second element of your classpath is probably the problem – change the command to:

 

java -cp .:jibx/lib/jibx-bind.jar org.jibx.binding.Compile binding.xml
 
And, of course, ensure that the file jibx/lib/jibx-bind.jar is resolvable from your CWD.

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of divya reddy
Sent: Wednesday, April 20, 2005 11:47 PM
To: [email protected]
Subject: [jibx-users] How to compile and run simple jibx

 

Hi,

I am just learning jibx and got some material from jibx.org

I have my binding definition ready and also the class files. As given in the jibx.org I tried to compile by following command

 

java -cp .:/jibx/lib/jibx-bind.jar org.jibx.binding.Compile binding.xml
but I am getting an error
Exception in thread "main" java.lang.NoClassDefFoundError: org/jibx/binding/Compile 
 
If this method is wrong please tell me how to compile and run.
Thanks,
Divya
 

Yahoo! India Matrimony: Find your life partner online.

Reply via email to