aspose file tools
The moose likes Java in General and the fly likes error while executing.. NoClassDefFound error. Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "error while executing.. NoClassDefFound error." Watch "error while executing.. NoClassDefFound error." New topic
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
    
    6

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
    
    3

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
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: error while executing.. NoClassDefFound error.
 
Similar Threads
Adding strings together
how to retrive the data of the last row in the table ?
Servlet Internal Error
IoStreams
error while running a program