java.lang.NoClassDefFoundError: helloWorld

hi guys and girls, i recently signed up here, so im kind of new, although ive been learning java just over a year now.

Im studying java at college and have had no problems running it, as of lately ive ran into somewhat of a problem and im having a mission solving it.

Im running EditPlus to write my code and im running JKD1.5.0_04 to compile and run my applications, i use the same configuration on my laptop as i do at college.

The problem is that lately ive been getting the following error in my output window:

- Java -

java.lang.NoClassDefFoundError: helloWorld

Exception in thread"main"

Output completed (0 sec consumed) - Normal Termination

and the Java im compiling is:

class helloWorld

{

publicstaticvoid main(String[] args)

{

System.out.println("Hello World!");

}

}

so as you can see its a basic piece of code, the filename is "helloWorld.java" and none of my java files will work, i chose the above for testing, but i have some quite complex programs aswell so im not entirely a newbie, ive been doing program for over 2-3 years now, java is just the newest addition to my programming vocab.

The codes clean and simple, no problems with it, when i compile the code it says no errors found and seems ok, when i try to run the code i get the above error, ive mucked about with my configuration but i just cannot get my head around this, its driving me nuts, what am i doing wrong?

and how do i fix this?

thank you in advance, any help you can give would be appreciated.

Reece.

[1905 byte] By [Reecea] at [2007-10-2 5:30:46]
# 1
I'm having the same problem, i'm running M$ Windows XP SP2, and have JRE 1.5 and JDK 1.5. I created some very simple test code as above as well as my usual university programming work but no joy... anyone have any ideas?pulling my hair out!jim
jimmaha at 2007-7-16 1:41:46 > top of Java-index,Desktop,Runtime Environment...
# 2
Classpath is not correctly set. Read documentsSetting the Classpath How Classes are Found Basic Tools - javacBasic Tools - javaavailable from this page: http://java.sun.com/j2se/1.5.0/docs/tooldocs/index.html#general
ChuckBinga at 2007-7-16 1:41:46 > top of Java-index,Desktop,Runtime Environment...
# 3

Hi there,

Problem often occurs when re飊stalling, easy to fix: i right-click on my computer, Properties, select the Advanced Tab, then press the Environment Variables button and a window pops up. At the bottom there's is a button with System Variables, press it. All you have to do is delete CLASSPATH and QTJava variables in the list.

Jay-Ba at 2007-7-16 1:41:46 > top of Java-index,Desktop,Runtime Environment...
# 4

Edit:

Hi there,

Problem often occurs when re飊stalling Java, easy to fix: right-click on my computer, Properties, select the Advanced Tab, then press the Environment Variables button below and a window pops up. At the bottom all you have to do is delete CLASSPATH and QTJava variables in the list.

Jay-Ba at 2007-7-16 1:41:46 > top of Java-index,Desktop,Runtime Environment...
# 5

after the first few posts i didnt think id find the answer i was looking for as i read the articles suggested but im new to all this and didnt understand them at all.

the last 2 posts were right on the spot, did the job perfectly, works like a gem now, thanks..i awarded the duke points you earnt for it.

Reecea at 2007-7-16 1:41:46 > top of Java-index,Desktop,Runtime Environment...