You have "C:\Program Files\Java\jdk1.6.0_14\bin" inside your path. There should be the file "java.exe" (and also "javac.exe" which you need for compilation) inside. But if you try to execute java.exe by calling "java -version" it gives you an error. That means that "java.exe" in not there! Can you please open this folder and see if this folder exists and if yes, if javac.exe is inside? If not, then you must give correct name in PATH (if javac.exe is somewhere else ) or reinstall java (if you cannot find it at all). I bet that's the problem, and after fixing it you will be able to compile in Notepad.
Second, avoid spaces in your pathname. Even if it works now, you will get problems later on! Put your code in a place that has underscores instead.
That means to "E:\Programming\Assignment_1_resources\A1Resources \Stage01" (note the underscore before and after "1"!). If you want to stick to Java coding standards, use Camel-Case, name it "Assignment1Resources".
Third, can you please give the output of %CLASSPATH% again? You typed an "S" at the end by mistake!
Instead of listing your source code yet, you can try to compile the code below. Only if the compilation of this source code works, and you still have compilation problems or other problems, you need to post your own code.
Filename: "Hello.java"
Compile: "javac Hello.java" (on command prompt)
Execute: "java Hello" (on command prompt, it should print "Hello World" on command line)
- public class Hello
-
{
-
public static void main (String argv[])
-
{
-
System.out.println("Hello World!");
-
}
-
}
-