aspose file tools
The moose likes Beginning Java and the fly likes NoClassDefFoundError Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "NoClassDefFoundError" Watch "NoClassDefFoundError" New topic


Ramm Kummar

Joined: Feb 10, 2009
Posts: 26
Getting this error while running java. Please suggest. I have defined required things in the classpath

Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42954
You always need to give the fully qualified classname: "java com.wickedlysmart.CmdArgs". This should work assuming that the "classes" directory is in the classpath.
Eric Larsen
Ranch Hand

Joined: Mar 28, 2009
Posts: 35
From what I can see, you are currently in the same directory as your .class file. Instead of running the class from here, you should run it from the /classes directory, like this:

C:\MyProject\classes\>java com.wickedlysmart.CmdArgs

That is, assuming that the class includes a package statement at the beginning of the file:

Have you tried LearnNowOnline?
subject: NoClassDefFoundError