views:

36

answers:

3

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?

A: 

As long as the program is working i dont think that you need to worry!!! As MD5 would be unique for each entity, and it represents the Hash value.

harigm
+3  A: 

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.

Yann Ramin
This is very true, I've often found differences in the compiled class files between using the eclipse compiler and javac even for the same JDK version. If you're feeling adventurous then you can compare the output from `javap` run on the class file (turn up to maximum verbosity), and then vereify for yourself that the compiled programs do the same thing. However, it required intimate knowledge of the compiled class format and java bytecodes and it's a steep learning curve.
Geoff
A: 

It's normal, but I would make sure about doing a complete rebuild anyway (possibly erasing any existing class files). My experience with Eclipse is that the incremental builder doesn't react well to unexpected situations.

Uri