bootstrap的意思是
引导[自举,自展,自拔](程序),自引导指令[程序]
Note that the classes which implement the Java 2 SDK tools are in separate archive from the bootstrap classes.
也就是说tool.jar里的类不和那些bootstrap的类在一个包里。所以要加到CLASSPATH里面。
(我的理解)

解决方案 »

  1.   

    to carfi:
    可是在classpath中去掉tools.jar,javac和javadoc执行并没有出错,why?
    关键是对以下内容的理解:
    The class files used to resolve source code references are mostly the same class files used to run javac and javadoc. But there are some important exceptions: Both javac and javadoc often resolve references to classes and interfaces that having nothing to do with the implementation of javac or javadoc. Information on referenced user classes and interfaces may be present in the form of class files, source code files, or both. The tools classes in tools.jar are only used to run javac and javadoc. The tools classes are not used to resolve source code references unless tool.jar is in the user class path.
      

  2.   

    前面一段的第五行:The tools that process source code, javac and javadoc, use the original class path, not the augmented version. 
    这句话说:javac和javadoc不是用参数化的CLASSPATH,参数化的classpath就是在环境变量里设置的。所以,去掉tools.jar不会影响。
    “But there are some important exceptions: ”我想这种情况也许这是例外吧!
    这一段:
    The tools classes in tools.jar are only used to run javac and javadoc. The tools classes are not used to resolve source code references unless tool.jar is in the user class path. 也让我比较迷惑 :P 几年没好好学英语了~