• Post Reply Bookmark Topic Watch Topic
  • New Topic

ClassDefNotFounderror  RSS feed

 
dmohan kumar
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello , friends . can you help meee..

my problem is :

When i compile a simple java program , it gets compiled and class file is created . but when i run that prg it shows an error that [ ClassDefNotFound ] what should i do for that . please help me .
 
Nathan Leniz
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I used to get these all the time. If you are using something from the API or something of your own, make sure you are importing them correctly.

Posting the offending code would help too.
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Importing only affects compilation, not the running of the code later.

Most likely the missing class is not in the classpath. What command do you use to run the code, and where are the classes located?
 
Raj Kumar Bindal
Ranch Hand
Posts: 418
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Seems a minor mistake.
Check if you have added . into your classpath,so that jvm will check for class files in the current directory.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!