• Post Reply Bookmark Topic Watch Topic
  • New Topic

NoClassDefFoundError when executing java  RSS feed

 
carla milan
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,

i can compile my java application but when i try to execute it, i always get a NoClassDefFoundError in main..
I've searched about it on the net i've found on some forums that maybe its because that my my pc dont have a jvm installed but i have a java runtime environment installed on it..

any help would be greatly appreciated...thanks a lot!
 
Jibitesh Prasad
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check the Class name in which the main method exists.
 
carla milan
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have the correct class name
 
kiran kumar kondru
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

check the classpath variable. Assuming that you are on a Windows machine, type "%classpath%" without the quotes. The most probable cause is that it doesn't include the current directory. To include it type "classpath=.;%classpath%" with out the quotes. The problem will be solved temporarily. It will last until the currently using console is not closed.

To make it permanent, use windows help to append to an environment variable.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!