你文件名肯定是HelloWorld.java.txt
让你的windows显示扩展名,再改名字

解决方案 »

  1.   

    我就是这样做的啊,对了,HelloWorld.java在c:\jdk1.3.1_09\bin目录下,javac这些命令也在这个目录下,没问题吧
    键入javac显示
    C:\>javac
    Usage: javac <options> <source files>
    where possible options include:
      -g                        Generate all debugging info
      -g:none                   Generate no debugging info
      -g:{lines,vars,source}    Generate only some debugging info
      -O                        Optimize; may hinder debugging or enlarge class file  -nowarn                   Generate no warnings
      -verbose                  Output messages about what the compiler is doing
      -deprecation              Output source locations where deprecated APIs are us
    ed
      -classpath <path>         Specify where to find user class files
      -sourcepath <path>        Specify where to find input source files
      -bootclasspath <path>     Override location of bootstrap class files
      -extdirs <dirs>           Override location of installed extensions
      -d <directory>            Specify where to place generated class files
      -encoding <encoding>      Specify character encoding used by source files
      -target <release>         Generate class files for specific VM version
    应该算配置成功吧可是怎么不能编译呢??????????????????????????
      

  2.   

    我还是坚持我的看法
    你在c:\jdk1.3.1_09\bin下
    执行dir
    看看有没有HelloWorld.java
      

  3.   

    楼上说的对,如果当前目录下没有java文件,报的错误和你的一样,你再看看。祝你好运。
      

  4.   

    看,有吧,我就知道不是这个毛病C:\jdk1.3.1_09\bin>dir
     驱动器 C 中的卷没有标签。
     卷的序列号是 0E49-11DF C:\jdk1.3.1_09\bin 的目录2003-10-08  08:53       <DIR>          .
    2003-10-08  08:53       <DIR>          ..
    2003-08-04  15:53                  360 HtmlConverter.bat
    2003-08-04  15:53               20,600 appletviewer.exe
    2003-08-04  15:53               24,678 dt_shmem.dll
    2003-08-04  15:53               20,584 dt_socket.dll
    2003-08-04  15:53               20,598 extcheck.exe
    2003-08-04  15:53               20,600 idlj.exe
    2003-08-04  15:53               20,581 jar.exe
    2003-08-04  15:53               20,602 jarsigner.exe
    2003-08-04  15:53               20,574 java.exe
    2003-08-04  15:53               20,595 javac.exe
    2003-08-04  15:53               20,595 javadoc.exe
    2003-08-04  15:53               20,595 javah.exe
    2003-08-04  15:53               20,591 javap.exe
    2003-08-04  15:53               20,576 javaw.exe
    2003-08-04  15:53               20,604 jdb.exe
    2003-08-04  15:53               94,302 jdwp.dll
    2003-08-04  15:53               20,598 keytool.exe
    2003-08-04  15:53               20,612 native2ascii.exe
    2003-08-04  15:53               20,580 oldjava.exe
    2003-08-04  15:53               20,597 oldjavac.exe
    2003-08-04  15:53               20,582 oldjavaw.exe
    2003-08-04  15:53               20,596 oldjdb.exe
    2003-08-04  15:53               20,604 policytool.exe
    2003-08-04  15:53               20,586 rmic.exe
    2003-08-04  15:53               20,592 rmid.exe
    2003-08-04  15:53               20,604 rmiregistry.exe
    2003-08-04  15:53               20,603 serialver.exe
    2003-08-04  15:53               20,619 tnameserv.exe
    2003-08-04  15:53               20,590 unregbean.exe
    2003-10-08  09:23                  110 HelloWorld.java
                  30 个文件        654,908 字节
                   2 个目录  7,100,579,840 可用字节
      

  5.   

    如果在C:\jdk1.3.1_09\bin>下执行javac HelloWorld.java就会出现这样的错误,唉,怎么会这样呢C:\jdk1.3.1_09\bin>javac HelloWorld.java
    HelloWorld.java:5: ';' expected
    system.out println("HelloWorld");
                      ^
    HelloWorld.java:5: cannot resolve symbol
    symbol  : class out
    location: package system
    system.out println("HelloWorld");
          ^
    2 errors
      

  6.   

    System.out.println("HelloWorld");
      

  7.   

    System.out.println("HelloWorld");
    要大写s
      

  8.   

    system.out println("HelloWorld");
    =>System.out.println("HelloWorld")
      

  9.   

    好了,问题解决了,谢谢各位了我是个java新手,以后希望各位哥哥姐姐多多帮忙,谢谢,^_^