今晚遇到一个坑,原因是eclipse使用自己的编译器
所以大家得注意呀,那家伙是自带javac的呀
有位兄弟有遇到并处理过相关的问题
关于eclipse和javac编译结果不一致的问题的分析与解决
网摘
的确,如果使用eclipse的话,只安装jre就可以了,jdk中编译java源程序的工具是javac,但是eclipse使用的不是javac!eclipse的JDT用的是自己写的编译器,对javac没有任何依赖关系,这一直是Eclipse一件自豪的事情。 其实这也没什么好奇怪的,编译这项工作不一定非要交给jdk不可,正如tomcat能够编译jsp一样 JDT Core JDT Core is the Java infrastructure of the Java IDE. It includes: * An incremental Java compiler. Implemented as an Eclipse builder, it is based on technology evolved from VisualAge for Java compiler. In particular, it allows to run and debug code which still contains unresolved errors.