Hi all,
I have recently formatted my system and i have again set the required path and classpath
(ie : controlpanel->system->adv->env variable->new->set path where jdk 1.5 bin is located)
All other programs run and compile fine except for the programs that contain packages.
the programs that contain packages compile and the class file is created but when i try to run the program
(eg:
java world.HelloWorld where world is the name of the package and HelloWorld is the name of the source file) i get an error that says
Exception in
thread "main" java.lang.NoClassDefFoundError: world/HelloWorld
on the command prompt.
I have tried everything possible(even compiling with java -classpath . food.Junk gives the same error)
I SURRENDER
PLEASE HELP ME
P.S: package files would compile and run before formatting my pc.....i dont know whats the problem now.