This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
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


Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "NoClassDefFound Exception" Watch "NoClassDefFound Exception" New topic
Author

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
Rancher

Joined: Mar 22, 2005
Posts: 42954
    
  73
"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.
 
 
subject: NoClassDefFound Exception