Skip to Main Content

Java APIs

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

runtime error

843810Feb 23 2005 — edited Feb 25 2005
About 3 days ago I reformatted because of some issues with some software I installed for a class. I reinstalled J2SE, Ant, and JDOM, and I didn't seem to encounter any problems. I started reimplementing my project using Eclipse and I noticed that everything worked fine, as long as I ran the program from Eclipse, until I tried to work with JDOM. For some reason, I couldn't get Eclipse to recognize it, even though I was doing everything just like the slides. So I removed all JDOM related lines of code to try to get back to where I was before I had these issues. I closed Eclipse and tried to compile and run the program from the command line. The program compiled, but didn't run. Six errors were found, none of which existed when running in Eclipse. So I went back to the HelloWorld application to figure out if I could run any program. I compiled HelloWorld.java with "javac HelloWorld.java" and that worked. Then I tried to run it with "java HelloWorld" and I received the following error:

"Exception in thread "main" java.lang.NoClassDefFoundError: HelloWorld"

This really confused me and after I couldn't find any solutions to this problem in a google search, I went ahead and uninstalled and reinstalled J2SE. I also got rid of Eclipse and NetBeans so that I could get rid of all Java related IDE's, which I thought could have caused the problem. After reinstalling J2SE I recreated the HelloWorld project but the same problem occurred. I really have no clue what is going on and this is coming a terrible time since I have to be sure that I can compile and run programs from the command line, so any help would be much appreciated. Thanks.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 25 2005
Added on Feb 23 2005
6 comments
57 views