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 | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Java in General
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: 10905
    
  12

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"?


There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
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
Saloon Keeper

Joined: Aug 16, 2005
Posts: 13867
    
  10

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://aspose.com/file-tools
 
subject: error while executing.. NoClassDefFound error.
 
Similar Threads
error while running a program
Servlet Internal Error
IoStreams
Adding strings together
how to retrive the data of the last row in the table ?