Reputation: 450
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 me the reason behind that?
Upvotes: 4
Views: 676
Reputation: 24788
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).
Upvotes: 5
Reputation: 181290
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.
Upvotes: 1