| Author |
error while executing.. NoClassDefFound error.
|
Deepak Damodaran
Greenhorn
Joined: Jan 10, 2007
Posts: 3
|
|
hii everybody.. i have complied a program(or any program) but when i satrs to execute it shows an error of Exception in thread "main" java.lang.NoClassDefFoundError:classname/java can anybody tell me how to fix this problem....
|
 |
mohsen fakhari
Greenhorn
Joined: May 04, 2003
Posts: 25
|
|
Hi Obviously it cannot find one of your classes! Maybe the class is not in your classpath. Maybe you've misspelled its name. Maybe...
|
 |
Deepak Damodaran
Greenhorn
Joined: Jan 10, 2007
Posts: 3
|
|
|
i hav set classpath.. even class mae is also correct..but even a simple HELLO program is not workin
|
 |
fred rosenberger
lowercase baba
Bartender
Joined: Oct 02, 2003
Posts: 9946
|
|
This should probably be in the beginner's forum. However, when you run your program, are you typing "java classname.java"? or are you typeing "java classname"?
|
Never ascribe to malice that which can be adequately explained by stupidity.
|
 |
Deepak Damodaran
Greenhorn
Joined: Jan 10, 2007
Posts: 3
|
|
|
i hav typed " java class name " but still error occurs.. but i cleared it . i had to reinstall java it is okay now thank you guys for your comments
|
 |
Jesper de Jong
Java Cowboy
Bartender
Joined: Aug 16, 2005
Posts: 12911
|
|
Exception in thread "main" java.lang.NoClassDefFoundError:classname/java The "/java" at the end of the error message indicates that you have typed: java classname.java instead of: java classname Re-installing Java was not necessary... :roll:
|
Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
|
 |
 |
|
|
subject: error while executing.. NoClassDefFound error.
|
|
|