This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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: 39535
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.

Ping & DNS - updated with new look and Ping home screen widget
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:

I agree. Here's the link:
subject: NoClassDefFoundError
Similar Threads
Class path magic
abstract class
Why oh why do I even Try??
Issues with cmd java command