Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Beginning Java and the fly likes running applications Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "running applications" Watch "running applications" New topic
Author

running applications

Benjoe Reyes
Ranch Hand

Joined: Apr 24, 2002
Posts: 109
finally my "jar problem" had blown away...
but there is another problem... when i am running some test codes or any java programs for that matter i always get the message:
Exception in thread "main" java.lang.NoClassDefFoundError <class name>
i compiled it (javac <file.java> but i still get this message.
i used to run it direct in Context editor then i tried in DOS console in the file's directory but to no avail
thanks
tormod eriksen
Ranch Hand

Joined: Jan 23, 2002
Posts: 52
Have you correctly set the classpath to the directory where the classfile is? (you can also set current directory (.) in the classpath)
Benjoe Reyes
Ranch Hand

Joined: Apr 24, 2002
Posts: 109
i think i got it... i was looking at the autoexec.bat file and saw that my oracle 9i also has an SDK bin set at the PATH. when i deleted the line all went well...
thanks...
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: running applications