你的classpath设置不正确,要加入:
.
就是:
set classpath=%classpath%;.

解决方案 »

  1.   

    http://expert.csdn.net/Expert/topic/1437/1437350.xml?temp=.1367914
      

  2.   

    我的是win2kp 书上的例子helldate 顺利编译,运行,自己用记事本写了个"hello.java"
    public class JavaPrograme1{
    public class static void main(String args[]){
    system.out.println("I have been a programer!")
    }
    }
    执行 javac Hello.java
    C:\xu\c02>javac hello.java
    hello.java:2: <identifier> expected
    public class static void main(String args[]){
                 ^
    hello.java:4: '{' expected
    }
     ^
    hello.java:5: '}' expected
    }
     ^
    hello.java:1: class JavaPrograme1 is public, should be declared in a file named
    JavaPrograme1.java
    public class JavaPrograme1{
           ^
    4 errors
    郁闷
    请指教?