File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Other Open Source Projects and the fly likes NoClassDefFound Exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "NoClassDefFound Exception" Watch "NoClassDefFound Exception" New topic

NoClassDefFound Exception

sonia arora
Ranch Hand

Joined: Mar 10, 2010
Posts: 31
i am trying to use jexcelapi to generate output in excel sheet.
i am able to compile the file .
but when i run it by command prompt as:
java -classpath "c:\program files\jexcelapi\jxl.jar ";"c:\program files\java\jdk1.6.0_18\bin" create
then error is encountered that is:
"Exception in thread "main" java.lang.NoClassDefFoundError:;
caused by: java.lang.NoClassFoundException:,
cound not find main class:,program will exit.

but the create.class file is there in bin folder. then why this exception .
can anyone help?
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
"c:\program files\jexcelapi\jxl.jar ";"c:\program files\java\jdk1.6.0_18\bin"

That's not the right way to specify paths. Try "c:\program files\jexcelapi\jxl.jar;c:\program files\java\jdk1.6.0_18\bin" instead. Note that the "bin" directory should not contain any classes or jar files, and thus should not be part of the classpath.
sonia arora
Ranch Hand

Joined: Mar 10, 2010
Posts: 31
thanks. issue got resolved.
I agree. Here's the link:
subject: NoClassDefFound Exception
jQuery in Action, 3rd edition