Ebuilds for the dev-java/sun-jdk-1.4.2 and dev-java/java-sdk-docs-1.4.2 Reproducible: Always Steps to Reproduce:
Created attachment 13990 [details] sun-jdk-1.4.2.ebuild
Created attachment 13991 [details] files/sun-jdk-1.4.2
Created attachment 13992 [details] java-sdk-docs-1.4.2.ebuild
This ebuild does not work quite correctly. There are certain files that are compressed with Sun's new packing technology and they show up as *.pack files instead of *.jar files. The $JAVA_HOME/lib/unpack command needs to be invoked on these files to unpack them before the JDK is usable. Otherwise you'll get a class not found error since rt.jar is one of these packed files. Revised ebuild follows.
Created attachment 14006 [details] new ebuild that works correctly
Argh, shame on me. Seems I tested with the wrong installation. Thanks a lot for the correction.
Sure thing, happens to all of us. :) I noticed that in your ebuild you install the gcc3 plugin by default. Since I'm still using gentoo 1.2, I hand edited the plugin symlink. I suppose you'll have some kind of detection code for gcc version and install the apropriate plugin in the final ebuild? Otherwise there'll likely be much anguish in the forums from 1.2 users.
Created attachment 14064 [details] sun-jdk-1.4.2.ebuild (revised) The plugin to install is now chosen according to the gcc version. This will still break if you use gcc-3.2.x and install a binary package compiled with gcc-2.*, for example. A sun_java.desktop file is installed if gnome or kde occurs in the USE variable. (Limitation: For KDE, 3.1.x is expected)
Created attachment 14065 [details] files/sun-jdk-1.4.2
Note, that emerging dev-java/ant with this JDK fails. Actually the emerge appears to work but the java compile during the build fails and you end up with a brokent ant. This appears to be a bug in the ant build.
The emerge shouldn't install a broken build. You are right, the problem is related to ant: The code for the javah-task uses a constructor of the unofficial class com.sun.tools.javah.Main - public com.sun.tools.javah.Main(java.lang.String[]); This constructor does not exist in j2se-1.4.2 any longer (as far as javap tells me). According to the ant-user list, the problem is fixed in ant-1.6 from CVS.
See bug 23874 for the "build ant with sun-jdk-1.4.2" problem
Any change of this getting into portage soon ? Or are we REALLY waiting for ant to release a new version?
*** Bug 24946 has been marked as a duplicate of this bug. ***
*** Bug 25338 has been marked as a duplicate of this bug. ***
Thanks to all for helping on this bug, im actually checking it, and it should be added ~arch masked to portage in a couple of days (I Hope).
Also, i want to update ant to a 1.6 version snapshot ~arch masked so it will work with this JDK, so i should be adding all these packages (sun-jdk, sun-jdk-docs, ant) on friday.
This packages has been unmasked from package.mask. Thanks for your support, specially to Carsten Frewert who made the patches for ant. This is now on testing. Please feel free to fill a bug report if you find a bug.