The Sun compiler just runs on top of the VM so no reason for it to differentiate.
Unfortunately there is no reason.....
In the bug database I found bug 4212732. Now I wonder why 1.6 behaves different from 1.5. The desciption of the bug says that it was a bug that javac ignores classpath manifest entries in jar files, but that it is solved in 1.5.
So I should have had my problems already with 1.5.
Anyway, I will be out of office for a while and I'm glad that it will work for us, when I return from my holidays.
I have the same problem on my project. We have a fairly large J2EE project and we want to migrate it from java 1.4 to 1.6. The compilation in 1.4 takes ~7 minutes to all the projects, but in 1.6 its takes ~20 minutes, which is way to long.
As I understand this is due to a bug fix in java 5 and up, where all references in manifest files are added to classpath of the compiler. I looked at the compiler classpath and its about 10 times bigger (every jar that appears in (say) 10 manifest files is added to the classpath 10 times, in addition that this path was also set in classpath manually ).
Is this the normal behavior? shouldn't there be a bug opened on this to reverse the 'fix'?
If this is not a bug, how would you suggest should we adjust our project to this feature with minimum trouble?
Another question - when I tried to compile in java 5, it was as quick as in java 1.4 and the classpath didn't include paths from manifest, although as mentioned above the fix of adding paths from manifest was added in java 5. Do you know what is the reason for this?
Has anyone got the solution for this issue?. When i build using Java 1.6 version, the compilation is very slow. It is quite weird that no one has found a solution to this. I am using maven 2.0.10 java 1.6 update 17.