I've trying to start learning Java and already in stuck with the easiest possible program (http://introcs.cs.princeton.edu/java/11hello/)
So I created HelloWorld.java
with
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, World");
}
}
Compiled it with D:\tmp\java>javac HelloWorld.java
(all passed fine, without errors)
And tried to run compiled .class
:
D:\tmp\java>java HelloWorld.class
Error: Could not find or load main class HelloWorld.class
I have
D:\tmp\java>javac -version
javac 1.7.0
and cannot get why such trivial example doesn't work :-S