Changes between Version 5 and Version 6 of jdk

09/18/2008 02:35:14 AM (14 years ago)
DJ Lucas



  • jdk

    v5 v6  
     33= OpenJDK-6 (IcedTea-6) =
     35First, BLFS-6.3 is the minimum target and you must have a working Ant (which requires a JDK), and GTK+.
     37Next, you will need GCJ-4.3.0 or better (gcc-4.3.2 at the time of writing).
     38Install it using the following instructions:
     41sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/ &&
     42sed -i 's@\./fixinc\.sh@-c true@' gcc/ &&
     43sed -i 's/@have_mktemp_command@/yes/' gcc/ &&
     44mkdir ../gcc-build &&
     45cd ../gcc-build &&
     46../gcc-4.3.2/configure \
     47    --prefix=/opt/gcc-4.3.2 \
     48    --libexecdir=/usr/lib \
     49    --enable-shared \
     50    --enable-threads=posix \
     51    --enable-__cxa_atexit \
     52    --enable-clocale=gnu \
     53    --enable-languages=c,c++,java &&
     54make &&
     55sudo make install &&
     56sudo ln -v -sf `find /opt/gcc-4.3.2/lib/gcc -name ffitarget.h` \
     57    /opt/gcc-4.3.2/include
     60Next, you will need to install several freely available jars into our new gcc directory (to isolate them from the rest of the system).
     64cp *.jar /opt/gcc-4.3.2/share/java/
     69cp *.jar /opt/gcc-4.3.2/share/java/
     73cp ecj-3.5M1.jar /opt/gcc-4.3.2/share/java/
     77Now, you will need to download and install a little gcj-compat package from RedHat. We could do all of this manually, but despite the long list of commands, this is much easier.
     80./configure --prefix=/opt/gcc-4.3.2 &&
     81sudo make install &&
     82sudo ln -vsf ../../../../bin/gjar \
     83    /opt/gcc-4.3.2/lib/jvm/java-1.5.0-gcj- &&
     84sudo ln -vsf ../../../../bin/gjavah \
     85    /opt/gcc-4.3.2/lib/jvm/java-1.5.0-gcj- &&
     86sudo rm -rf /opt/gcc-4.3.2/lib/jvm/java-1.5.0-gcj- &&
     87sudo ln -vsf ../../../lib/gcc/i686-pc-linux-gnu/4.3.2/include \
     88    /opt/gcc-4.3.2/lib/jvm/java-1.5.0-gcj- &&
     89sudo rm -rf /opt/gcc-4.3.2/lib/jvm/java-1.5.0-gcj- &&
     90sudo ln -vsf ../../../../../lib/gcj-4.3.2-9 \
     91    /opt/gcc-4.3.2/lib/jvm/java-1.5.0-gcj-
     94Ignore the unresolved javadoc symlink, it is not needed, but can be fufilled by gjdoc if you prefer (good luck, it's also a PITA deserving it's own wiki page).
     96Now download IcedTea6 from the git repository (or release when available) (click the bz2 link).
     98You will also need the latest OpenJDK-6 source will not need to download the binary plugs as free alternatives are provided by IcedTea.
     100Now extract the IcedTea6 tarball, and copy the OpenJDK-6 tarball into the extracted directory.
     102'''NOTE''':  Below we create three symlinks in the main filesystem.  This is done to avoid adding another patch to the growing list of patches in IcedTea-6.  To create a patch is trivial, however, the patch would have to be updated frequently to keep up with development since it patches the downloaded openjdk6 source files, which are not yet in the tree. The symlink method is much easier until a stable release is made.
     104'''NOTE''':  As of 20080916, a patch has been submitted upstream to fix a build error. Check the changelog to see if you still need it.
     106Building the beast:
     108unset JAVA_HOME &&
     109unset CLASSPATH &&
     110sudo ln -s /opt/ant/bin/ant /usr/bin &&
     111sudo ln -s /usr/bin/touch /bin &&
     112sudo ln -s /bin/find /usr/bin &&
     113./ &&
     114./configure \
     115    --with-ant-home=/opt/ant \
     116    --with-libgcj-jar=/opt/gcc-4.3.2/share/java/libgcj-4.3.2.jar \
     117    --with-gcj-home=/opt/gcc-4.3.2/lib/jvm/java-1.5.0-gcj- \
     118    --with-java=/opt/gcc-4.3.2/bin/gij \
     119    --with-jar=/opt/gcc-4.3.2/bin/gjar \
     120    --with-rmic=/opt/gcc-4.3.2/bin/grmic \
     121    --with-javah=/opt/gcc-4.3.2/bin/gjavah \
     122    --with-ecj-jar=/opt/gcc-4.3.2/share/java/ecj-3.5M1.jar \
     123    --with-xalan2-jar=/opt/gcc-4.3.2/share/java/xalan.jar \
     124    --with-xalan2-serializer-jar=/opt/gcc-4.3.2/share/java/serializer.jar \
     125    --with-xerces2-jar=/opt/gcc-4.3.2/share/java/xercesImpl.jar \
     126    --with-rhino=/opt/gcc-4.3.2/share/java/js.jar &&
     130Go get some coffee, or lunch, a late night snack, take a nap, go to bed...and 2-3 hours later:
     132Install the beast:
     134sudo cp -a j2sdk-image /opt/openjdk-1.6.0_0-b12 &&
     135sudo rm /opt/jdk &&
     136sudo ln -sfv openjdk-1.6.0_0-b12 /opt/jdk &&
     137sudo rm /opt/jdk/jre/lib/rhino.jar &&
     138sudo cp /opt/gcc-4.3.2/share/java/js.jar /opt/jdk/jre/lib/rhino.jar
     141If you've used the BLFS instructions to install the original Sun JDK, for Ant, then all you need to do is refresh your profile...unless you want to use the browser plugin.  The browser plugin is located at /opt/jdk/jre/lib/i386/ and it should be symlinked just like in the current JDK instructions.  Close the browser and reopen after refreshing your profile.
     143That's it.  Hope you enjoy.
    32146[wiki:Programming Up][[br]]
    33147[wiki:BlfsNotes Top]