• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

NoClassDefFound Exception

 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

"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
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks. issue got resolved.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic