ant building 报找不到com.sun.tools.javac.Main

今天,在eclipse2.1中用run ant运行ppig写的ant脚本编译学习日记文档时,发现通不过,报找不到com.sun.tools.javac.main;但不在eclipse2.1环境中在dos命令行窗口中执行能通过。最后,在windows->preferences->ant->Runtime->Classpath->Add Jars中,添加了jdk下面的\lib\tools.jar后,编译通过。原来com.sun.tools.javac.Main在这个tools.jar中。