配置classpath.;C:\Program Files\Java\jdk1.6.0_10\lib配置pathC:\Program Files\Java\jdk1.6.0_10\bin编译javac MyTest.java运行java MyTest注意:classpath前要加. 不然运行时就必须是java -classpath . MyTest