aspose file tools*
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
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
Marshal

Joined: Mar 22, 2005
Posts: 41863
    
  63
"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.


Ping & DNS - my free Android networking tools app
sonia arora
Ranch Hand

Joined: Mar 10, 2010
Posts: 31
thanks. issue got resolved.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: NoClassDefFound Exception