There are two primary reasons for requiring Java 1.4, with regards to Gentoo and building packages.
Just to recap why Java 1.5 was package was package.mask'd.... It really comes down to backwards compatibility, and that Java 1.5 isn't 100% backwards compatible with Java 1.4. Things that ran with Java 1.4 should still run with Java 1.5... but some things that once built with Java 1.4 no longer compile with Java 1.5.
Now, say you're using Java 1.5 to build all your packages, and then you come up to a package that can't compile for one of these reasons? It'd fail for one. But then you may try with Java 1.4... and all is well until you see a compile error: UnsupportedClassVersionError. What does this mean though?
Well, each major release of Java has it's own version of bytecode. Bytecode is forward compatible, ie run 1.4 bytecode in 1.5, but not backwards compatible. If you try to use 1.5 bytecode in 1.4, you will see the infernal UnsupportedClassVersionError. This happens because, since you were using Java 1.5, the dependencies of the package you were just trying to compile with 1.4 were built with 1.5, and the default behavior is to build the highest possible bytecode.
So, these are the reasons Java 1.5 was package.mask'd, and why we need to use Java 1.4 for building unmigrated packages.
Here is a few reasons how the new java system helps correct the situation.
For now you pretty much have to have a 1.4 jdk installed. Work is being done to get all packages migrated to the new java system. Along with testing them under 1.5, both compile and running. Which is a pretty large task, considering we still have to maintain other packages in the mean time.
There is no time frame for when Java 1.4 will no longer be required. We do welcome any help with migrating the remaining packages causing the 1.4 dependency. Then testing the packages under a 1.5 jdk and jre.
The contents of this document are licensed under the Creative Commons - Attribution / Share Alike license.