I just started learning Java and I installed JDK on my computer, but now I am trying the SIMPLEST of Java and its not compiling. I installed JDK on C:/Java/jdk7/
.
Whenever I try to compile, I get an error:
Error: Could not find or load main class com.sun.tools.javac.Main
Here is how I'm compiling:
javac test.java
I also tried:
javac.exe test.java
I don't know if my code is wrong or anything, but here is my test.java
:
class test {
public static void main(String args[]) {
System.out.println("Hello World!");
}
}
Here is JAVA_HOME:
C:Javajdk7
Any help would be appreciated!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…