Meaningless Drivel is fun!*
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 Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "NoClassDefFoundError" Watch "NoClassDefFoundError" New topic
Author

NoClassDefFoundError

Yan Lee
Ranch Hand

Joined: Sep 15, 2003
Posts: 94
I am trying to run my java program from command line and I get this error.
The class that I am trying to execute is in the classpath.
Should it be possible to run a java program from any directory, provided the classes are in the classpath?
Thanks in advance.
Michael Fitzmaurice
Ranch Hand

Joined: Aug 22, 2001
Posts: 168
Can you describe what the directory structure is, which directory you are in when you try to launch the app, and what your classpath is set to? The problem you are having is definitely because the JVM cannot find the class you are trying to run.


"One good thing about music - when it hits, you feel no pain" <P>Bob Marley
 
wood burning stoves
 
subject: NoClassDefFoundError
 
Similar Threads
How to set classpath in ant?.
Why does my java program only run with -debug in my parameters
Java lang error
how to run a client?
NoClassDefFoundError