public class HelloWorld {
static String str = "Hello World!";
public static void main(String[] args) {
System.out.println(str);
}
}
错误为:
Error:Could not find or load main class HelloWorld
看过这边文章:Win7 JDK7 Java环境变量设置 及Could not find or load main class
但是没用
无语了
汗,你不加 \ 的话,那在 path 中就得弄成 %JAVA_HOME%\bin 就可以了。一般来说,JAVA_HOME 变量路径的最后一个 \ 不要。