ThisIf you decompile your class file, you can see the below main() method. That is how the Java compiler knows about the compilation error in the class.
public static void main(String[] paramArrayOfString) { throw new Error("Unresolved compilation problem: \n\tType mismatch: cannot convert from long to int.\n"); } If you decompile your class file, you can see the above main() method of the class file, which the compiler has generated. This isAnd all this happens because of the compiler which Eclipse uses (Eclipse Compiler for Java), which Eclipse uses by default/comes bundled with, is not the same as the standard Java compiler!