开发者

Different class size between Eclipse IDE and javac

When I compile java sources under Eclipse IDE I have bigger generated class-files, than when I compile with javac in console.

Could you give m开发者_高级运维e the reason behind that?


Because Eclipse doesn't use javac, but its own compiler. From other thread: How to set up other-than-eclipse Java compiler for Eclipse IDE

From the JDT website:

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.

Keep in mind that for the library itself, Eclipse will still use the one from Sun's compiler that can be set using the procedure explained by another answers (NimChimpsky and The Elite).


Maybe because Eclipse's compile use debug=true by default and javac does not. So debug information (extra information) is included in Eclipse generated binaries.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜