Search code examples
eclipsejavac

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 me the reason behind that?


Solution

  • 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).