Search code examples
javaeclipse

Java compilation with two versions of Eclipse


I've got an old project in Eclipse 2.1 and compiled with a JDK 1.4.2_12. I want to upgrade the version of Eclipse to Eclipse Galileo.

I've imported my project and set the compilation level to 1.4 and I've also updated my build path to use the correct JDK.

The problem is that when I compare the compiled files in the classes folder in the two versions of Eclipse, the MD5 checksum are different.

Should I be worried about that fact or this is normal?


Solution

  • This is normal. The Eclipse compiler is free to change the class file structure as long as it conforms to the 1.4 JVM specification. If a 1.4 JVM will load and run the class, I see no issue.

    For truly pedantic cases, you should do your final builds with a JDK which matches the JRE, and not the Eclipse compiler.