1. The environment should be no problem, the CMD test Java and javac all pass.
Variable name classpath
The value of the variable.; %java_home%\lib;%java_home%\lib\dt.jar;%java_home%\lib\tools.jar
Variable name path
The value of the variable plus%java_home%\bin;%java_home%\jre\bin;
2. The running program should also be no problem, because it is based on not being on the basis, and has been compiled.
public class Hello
{
public static void Main (string[] args)
{
System.out.println ("Hello world!");
}
}
Problem solving:
Java Hello//Do not add suffixes when running!
Specific reasons: grammar rules. Run, just Java hello, do not add the. java suffix after hello. If added, the compiler will go to find Hello.java.class files, but in fact you are hello.class files, will naturally find AH. See clearly Javac Hello.java, compile is to add suffix name, java Hello explanation is not need to add suffix name.
Java compilation complete run-time error cannot find or load main class