executing compiled file under windows
Hi there,
i got the following problem:
i installed the jdk 1.5.0_06 on windows xp
i did set environmental variables (Path, JAVA_HOME)
i compiled a simple HelloWorld.java program
no problems there, result was HelloWorld.class
but when i want to start the whole thing the only thing i get is an exception.
i tried:
java HelloWorld.class
java HelloWorld
both tries resulted in:
"Exception in thread "main" java.lang.NoClassDefFoundError: HelloWorld"
i looked the exception up on java site, which brought me following result:
"public class NoClassDefFoundError
extends LinkageError
Thrown if the Java Virtual Machine or a ClassLoader instance tries to load in the definition of a class (as part of a normal method call or as part of creating a new instance using the new expression) and no definition of the class could be found.
The searched-for class definition existed when the currently executing class was compiled, but the definition can no longer be found. "
now im pretty new to java programing and wouldnt call myself a pro c/c++ programer either... so i dont have any clue what the problem is about the whole thing. would be very thankful for any hints.
i add the java code of the helloworld program, maybe its helpful...:
thnx in advance
publicclass HelloWorld/* extends object */{
publicstaticvoid main(String[] args){
System.out.println("Hello World!");
int a, b, c;
a = 17;
b = 21;
c= (a*a)+(b*b);
for (int i=0; i<10; i++)
System.out.println(i);
}//main
}// HelloWorld

