Index: general/prog/j2sdk.xml
===================================================================
--- general/prog/j2sdk.xml	(revision 41ece9ff390e64394372aebbbc943ff73c867539)
+++ general/prog/j2sdk.xml	(revision 1bf950c27754b9299f075c851330c76dcfeef91b)
@@ -1,5 +1,5 @@
-<sect1 id="j2sdk" xreflabel="j2sdk-&j2sdk-version;">
+<sect1 id="j2sdk" xreflabel="j2sdk-&j2sdk-src-version;">
 <?dbhtml filename="j2sdk.html" dir="general"?>
-<title>j2sdk-&j2sdk-version;</title>
+<title>j2sdk-&j2sdk-src-version;</title>
 
 &j2sdk-intro;
@@ -7,8 +7,4 @@
 &j2sdk-exp;
 &j2sdk-config;
-&cj2sdk-intro;
-&cj2sdk-inst;
-&cj2sdk-exp;
-&cj2sdk-config;
 &j2sdk-desc;
 
Index: general/prog/jdk/j2sdk-config.xml
===================================================================
--- general/prog/jdk/j2sdk-config.xml	(revision 41ece9ff390e64394372aebbbc943ff73c867539)
+++ general/prog/jdk/j2sdk-config.xml	(revision 1bf950c27754b9299f075c851330c76dcfeef91b)
@@ -2,28 +2,27 @@
 <title>Configuring j2sdk</title>
 
-<sect3><title>Config files</title>
-<para><userinput>/etc/profile, ~/.bash_profile, ~/.profile, ~/.bashrc</userinput></para>
+<sect3><title>Configuration Information</title>
+
+<para>We have two Java 2 SDK's installed in /opt/j2sdk. Decide on which one you
+would like to use as the default. For example if you decide to use the source
+compiled j2sdk, do the following:</para>
+
+<para><screen><userinput>ln -nsf j2sdk-&j2sdk-src-version; /opt/j2sdk/j2sdk
+</userinput></screen></para>
+
+<para>Add the following lines to your shell startup file (e.g. /etc/profile).
+</para>
+
+<para><screen><userinput>export JAVA_HOME=/opt/j2sdk/j2sdk
+export PATH=$PATH:$JAVA_HOME/bin</userinput></screen></para>
+
+<para>Add $JAVA_HOME/man to your MANPATH variable or to /etc/man.conf</para>
+
+<para>The java plugin is in the directory <userinput>$JAVA_HOME/jre/plugin/i?86/ns610/</userinput>.
+Make a symbolic link to the file in that directory from your plugins directory.
+</para>
+
 </sect3>
 
-<sect3><title>Configuration Information</title>
-
-<para>Add the following lines to the appropriate file listed
-above.</para>
-
-<para><screen><userinput>export JAVA_HOME=&lt;path to&gt;/j2sdk&j2sdk-version;
-export PATH=$PATH:$JAVA_HOME/bin</userinput></screen></para>
-
-<para>You now have a java development environment installed on your
-machine, however it is compiled with a different library than the other
-programs which creates incompatabilities.  Specifically, the plug-in
-will not work with browsers compiled on your machine.</para>
-
-<para>There is a solution if you are willing to accept the SUN COMMUNITY
-SOURCE LICENSE for the Java 2 Platform Standard Edition.  Note that you
-are not allowed to distribute the resulting JDK/JRE and you also cannot
-use the resulting JDK to compile programs for distribution unless they
-pass Sun's compatiblity tests. In short don't use the resulting JDK
-except for your personal use.</para>
-</sect3>
 </sect2>
 
Index: general/prog/jdk/j2sdk-exp.xml
===================================================================
--- general/prog/jdk/j2sdk-exp.xml	(revision 41ece9ff390e64394372aebbbc943ff73c867539)
+++ general/prog/jdk/j2sdk-exp.xml	(revision 1bf950c27754b9299f075c851330c76dcfeef91b)
@@ -2,7 +2,46 @@
 <title>Command explanations</title>
 
-<para><userinput>chmod 711 j2sdk*.bin :</userinput> Makes the downloaded bin file executible.</para>
+<para><userinput>T=`grep...:</userinput> Determines the part where the tarfile begins in the self extracting archive.</para>
 
-<para><userinput>cp ../libstdc++-libc6.1-1.so.2 j2sdk&j2sdk-version;/jre/lib/i386 :</userinput> Puts the linked gcc2 library where java can find it.</para> 
+<para><userinput>export ALT_BOOTDIR="$JAVA_HOME" :</userinput> This
+var sets location of the bootstrap JDK.
+</para>
+
+<para><userinput>export ALT_MOZILLA_PATH=$PWD :</userinput> This sets the
+variable that points to where you unzipped the mozilla headers.</para>
+
+<para><userinput>export ALT_DEVTOOLS_PATH="/usr/bin" :</userinput> This
+changes the location where the build finds the needed executables.
+</para>
+
+<para><userinput>export BUILD_NUMBER="blfs-`date +%s`" :</userinput> This will
+help you identify this compiled version of the runtime environment and
+virtual machine by appending this information to the version in the
+output to "java -version".</para>
+
+<para><userinput>export DEV_ONLY=true :</userinput> This command
+eliminates compiling the documentation and eliminates a dependency for
+rpm. </para>
+
+<para><userinput>unset JAVA_HOME :</userinput> This clears the JAVA_HOME
+variable and prevents misdirection during compile.</para>
+
+<para><userinput>unset CLASSPATH :</userinput> This clears the CLASSPATH
+variable and prevents misdirection during compile.</para>
+
+<para><userinput>unset CFLAGS... :</userinput> These flags cause miscompilation
+of the build. Never set these.
+</para>
+
+<para><userinput>export INSANE=true:</userinput> Unless you specify that you
+are insane the build will not proceed. The certified platform for the build is
+Redhat 6.1. The above variable ensures that all the errors related to
+compiling on a non-certifiedi platform will be converted to warnings.</para>
+
+<para><userinput>export MAKE_VERBOSE=true:</userinput> Allows the current
+compilation command to be displayed on the console.</para>
+
+<para><userinput>export ALT_CACERTS_FILE...: </userinput> Specifies the certificate
+file to use.</para>
 
 </sect2>
Index: general/prog/jdk/j2sdk-inst.xml
===================================================================
--- general/prog/jdk/j2sdk-inst.xml	(revision 41ece9ff390e64394372aebbbc943ff73c867539)
+++ general/prog/jdk/j2sdk-inst.xml	(revision 1bf950c27754b9299f075c851330c76dcfeef91b)
@@ -2,32 +2,72 @@
 <title>Installation of j2sdk</title>
 
-<para>Before installing j2sdk, you need to 
-download <filename>libstdc++-libc6.1-1.so.2.bz2</filename> 
-from <ulink url="&ffile-root;"/> and decompress it
-to your source directory.</para>
+<para>Both versions will be installed in parallel. You may choose to keep either
+or both.</para>
 
-<para>Install j2sdk by running the following commands:</para>
+<para>Install the binary version of the jdk by running the following commands:</para>
 
-<para><screen><userinput>mkdir java &amp;&amp;
-mv j2sdk*.bin java &amp;&amp;
-cd java &amp;&amp;
-chmod 711 j2sdk*.bin &amp;&amp;
-./j2sdk*.bin &amp;&amp;
-mv j2sdk*.bin .. &amp;&amp;
-cp ../libstdc++-libc6.1-1.so.2 j2sdk&j2sdk-version;/jre/lib/i386</userinput></screen></para>
+<para><screen><userinput>
+VERSION=&j2sdk-bin-version &amp;&amp;
+MV=`echo $VERSION | cut -d "_" -f 1,1` &amp;&amp;
+V=`echo ${VERSION} | sed -e "s/\./_/g"` &amp;&amp;
+T=`grep -a tail j2sdk-${V}-linux-i?86.bin | cut -f 2 -d " "` &amp;&amp;
+tail $T j2sdk-${V}-linux-i?86.bin > install.sfx.$$ &amp;&amp;
+chmod +x install.sfx.$$ &amp;&amp;
+./install.sfx.$$ &amp;&amp;
+cd j2sdk${VERSION} &amp;&amp;
+install -d /opt/j2sdk/j2sdk-precompiled-${MV} &amp;&amp;
+mv * /opt/j2sdk/j2sdk-precompiled-${MV}
+</userinput></screen></para>
 
-<para>Test the installation with the following commands:</para>
+<para>The binary version is now installed.</para>
 
-<para><screen><userinput>export JAVA_HOME=$PWD/j2sdk&j2sdk-version; &amp;&amp;
-j2sdk&j2sdk-version;/jre/bin/java -version</userinput></screen></para>
+<para>If you don't want to compile the source, skip ahead to the configuration
+section.</para>
 
-<para>If you get a version line, a description of the runtime
-environment and a desrciption of the client VM (virtual machine), you are ready
-to go.</para>
+<para>Add the recently compiled JDK to the path.</para>
+<screen><userinput>export JAVA_HOME=/opt/j2sdk/j2sdk-precompiled-${MV} &amp;&amp;
+export PATH=$PATH:${JAVA_HOME}/bin</userinput></screen>
 
-<para>If you are not going to compile java from scratch, move the java
-tree to <filename>/opt</filename>:</para>
+<para>Unzip and patch the source:</para>
 
-<para><screen><userinput>mv j2sdk&j2sdk-version; /opt/java</userinput></screen></para>
+<para><screen><userinput>
+VERSION=&j2sdk-src-version &amp;&amp;
+V=`echo $VERSION | sed -e "s/\./_/g"` &amp;&amp;
+unzip j2sdk-${V}-src-scsl.zip &amp;&amp;
+unzip j2sdk-${V}-mozilla_headers-unix.zip &amp;&amp;
+patch -Np1 -i j2sdk-${VERSION}-fix-intl-files.patch &amp;&amp;
+patch -Np1 -i j2sdk-${VERSION}-link-missing-libs.patch &amp;&amp;
+patch -Np1 -i j2sdk-${VERSION}-remove-fixed-paths.patch &amp;&amp;
+patch -Np1 -i j2sdk-${VERSION}-syntax-fixes.patch &amp;&amp;
+patch -Np1 -i j2sdk-${VERSION}-use-included-motif.patch
+</userinput></screen></para>
+
+<para>Set some vars which affect the build:</para>
+<para><screen><userinput>
+export ALT_BOOTDIR="$JAVA_HOME" &amp;&amp;
+unset JAVA_HOME &amp;&amp;
+unset CLASSPATH &amp;&amp;
+unset CFLAGS &amp;&amp;
+unset CXXFLAGS &amp;&amp;
+unset LDFLAGS &amp;&amp;
+export ALT_DEVTOOLS_PATH="/usr/bin" &amp;&amp;
+export BUILD_NUMBER="blfs-`date +%s`" &amp;&amp;
+export DEV_ONLY=true &amp;&amp;
+export ALT_MOZILLA_PATH=$PWD &amp;&amp;
+export INSANE=true &amp;&amp;
+export MAKE_VERBOSE=true &amp;&amp;
+export ALT_CACERTS_FILE=${ALT_BOOTDIR}/jre/lib/security/cacerts
+</userinput></screen></para>
+
+<para>Make and Install j2sdk with the following commands:</para>
+
+<para><screen><userinput>
+cd control/make &amp;&amp;
+make &amp;&amp;
+cd ../.. &amp;&amp;
+cd control/build/linux-i?86 &amp;&amp;
+cp -a j2sdk-image /opt/java/j2sdk-&j2sdk-src-version; &amp;&amp;
+</userinput></screen></para>
+
 </sect2>
 
Index: general/prog/jdk/j2sdk-intro.xml
===================================================================
--- general/prog/jdk/j2sdk-intro.xml	(revision 41ece9ff390e64394372aebbbc943ff73c867539)
+++ general/prog/jdk/j2sdk-intro.xml	(revision 1bf950c27754b9299f075c851330c76dcfeef91b)
@@ -1,15 +1,44 @@
 <sect2>
-<title>Introduction to j2sdk (binary version)</title>
+<title>Introduction to j2sdk</title>
 
 <screen>Download location (HTTP):       <ulink url="&j2sdk-download-http;"/>
-Download location (FTP):        <ulink url="&j2sdk-download-ftp;"/>
-Version used:                   &j2sdk-version;
-Package size:                   &j2sdk-size;
-Estimated Disk space required:  &j2sdk-buildsize;</screen>
+Version used (binary):       &j2sdk-bin-version;
+Version used (source):       &j2sdk-src-version;
+Package size (binary):       &j2sdk-bin-size;
+Package size (source):       &j2sdk-src-size;
+Estimated Disk space required:  &j2sdk-src-buildsize;</screen>
 
-<para>The j2sdk package contains Sun's java development environment -
-precompiled. This is needed to fulfull the circular dependency when we
-compile java.</para>
+<para>The j2sdk package contains Sun's java development environment.
+This is useful for developing java programs and provides the runtime
+environment necessary to run java programs.  It also includes a plug-in
+for browsers so that they can be java aware.</para>
 
+<para>
+The JDK comes in two flavors, a precompiled binary and a source package. The
+precompiled binary is linked against gcc2 libraries. Due to the incompatibilities
+between gcc2 and gcc3, the precompiled java plugin causes problems when gcc3
+compiled packages (for example mozilla) try to load the java plugin.
+The source package requires registration at the Sun developer site and accepting
+the Sun Community Source License.
+The source code cannot be downloaded from some countries, so for users
+from those countries, the binary may be the only option.
+</para>
+
+<para>Even if you plan on compiling the jdk source, you will need to download
+the binary version to bootstrap the jdk build.
+Follow the above link to download both source and binary packages. When
+downloading the source also download the mozilla headers package available at
+the same location.
+</para>
+
+<para>Download the patches for j2sdk source from <ulink url="&ffile-root;"/>
+</para>
+
+<para>If you have difficulties in building the jdk, check out the javafromscratch
+hint for detailed information at <ulink url="http://www.linuxfromscratch.org/~tushar/"/>.
+</para>
+
+<screen>j2sdk depends on:
+<xref linkend="xfree86"/>, <xref linkend="zip"/>, <xref linkend="unzip"/>, <xref linkend="cpio"/>, <xref linkend="tcsh"/>, gcc2-lib</screen>
 
 </sect2>
Index: general/prog/jdk/j2sdk.ent
===================================================================
--- general/prog/jdk/j2sdk.ent	(revision 41ece9ff390e64394372aebbbc943ff73c867539)
+++ general/prog/jdk/j2sdk.ent	(revision 1bf950c27754b9299f075c851330c76dcfeef91b)
@@ -5,18 +5,10 @@
 <!ENTITY j2sdk-desc SYSTEM "j2sdk-desc.xml">
 <!ENTITY j2sdk-config SYSTEM "j2sdk-config.xml">
-<!ENTITY j2sdk-buildsize "82 MB">
-<!ENTITY j2sdk-version "1.4.0_01">
+<!ENTITY j2sdk-bin-size "59 MB">
+<!ENTITY j2sdk-src-buildsize "1186 MB">
+<!ENTITY j2sdk-src-size "77 MB">
+<!ENTITY j2sdk-bin-version "1.4.1_01">
+<!ENTITY j2sdk-src-version "1.4.1">
 <!ENTITY j2sdk-download-http "http://freshmeat.net/projects/sunjdk">
-<!ENTITY j2sdk-download-ftp "">
-<!ENTITY j2sdk-size "39.8 MB">
-<!ENTITY cj2sdk-intro SYSTEM "compiled-j2sdk-intro.xml">
-<!ENTITY cj2sdk-inst SYSTEM "compiled-j2sdk-inst.xml">
-<!ENTITY cj2sdk-exp SYSTEM "compiled-j2sdk-exp.xml">
-<!ENTITY cj2sdk-config SYSTEM "compiled-j2sdk-config.xml">
-<!ENTITY cj2sdk-buildsize "1186 MB">
-<!ENTITY cj2sdk-version "1.4.0">
-<!ENTITY cj2sdk-download-http "http://wwws.sun.com/software/java2/download.html">
-<!ENTITY cj2sdk-download-ftp "">
-<!ENTITY cj2sdk-size "52.2 MB">
 
 
