通常我们写好的java应用程序使用javac来编译,那javac是什么工具编译出来的?

解决方案 »

  1.   

    java编译器是java编译器编译出来的?
      

  2.   

    java编译器是java编写的。$ java -classpath $JAVA_HOME/lib/tools.jar sun.tools.javac.Main
    Usage: javac <options> <source files>where <options> includes:
      -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 files
      -nowarn                Generate no warnings
      -verbose               Output messages about what the compiler is doing
      -deprecation           Output source locations where deprecated APIs are used
      -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
      

  3.   

    Java
      

  4.   

    哈哈,楼主的意思是想问 Java 编译器是 Java 写的,但是 Java 编译器的源代码是谁来编译的呢?很显然,最早的 Java 编译器肯定不是 Java 编写的。一个先有鸡,还是先有蛋的问题,呵呵。
      

  5.   

    就这样的几句话就可以编译出javac编译器?表示不理解,可以注释一下?
      

  6.   


    JVM 是 C++ 写的,但是 javac 编译器是纯 Java 代码哦,呵呵,大概有 100 来个类,6 万多行源代码。