2002-08-10 10:42:59 +08:00
|
|
|
<sect2>
|
|
|
|
<title>Installation of j2sdk</title>
|
|
|
|
|
2003-01-30 16:04:11 +08:00
|
|
|
<para>Both versions will be installed in parallel. You may choose to keep either
|
|
|
|
or both.</para>
|
2002-08-10 10:42:59 +08:00
|
|
|
|
2003-09-21 06:28:42 +08:00
|
|
|
<para>Installation of the precompiled JDK is easy, change the executable bit for
|
|
|
|
the downloaded file, change to the directory where you want it installed
|
|
|
|
and execute the downloaded file.</para>
|
2002-08-10 10:42:59 +08:00
|
|
|
|
2003-02-01 01:36:22 +08:00
|
|
|
<para><screen><userinput>VERSION=&j2sdk-bin-version; &&
|
2003-01-30 16:04:11 +08:00
|
|
|
MV=`echo $VERSION | cut -d "_" -f 1,1` &&
|
|
|
|
V=`echo ${VERSION} | sed -e "s/\./_/g"` &&
|
2003-09-21 06:28:42 +08:00
|
|
|
chmod +x j2sdk-${V}-linux-i?86.bin &&
|
|
|
|
./j2sdk-${V}-linux-i?86.bin &&
|
2003-01-30 16:04:11 +08:00
|
|
|
cd j2sdk${VERSION} &&
|
|
|
|
install -d /opt/j2sdk/j2sdk-precompiled-${MV} &&
|
2003-02-01 01:36:22 +08:00
|
|
|
mv * /opt/j2sdk/j2sdk-precompiled-${MV}</userinput></screen></para>
|
2002-08-10 10:42:59 +08:00
|
|
|
|
2003-01-30 16:04:11 +08:00
|
|
|
<para>The binary version is now installed.</para>
|
2002-08-10 10:42:59 +08:00
|
|
|
|
2003-01-30 16:04:11 +08:00
|
|
|
<para>If you don't want to compile the source, skip ahead to the configuration
|
|
|
|
section.</para>
|
2002-08-10 10:42:59 +08:00
|
|
|
|
2003-01-30 16:04:11 +08:00
|
|
|
<para>Add the recently compiled JDK to the path.</para>
|
|
|
|
<screen><userinput>export JAVA_HOME=/opt/j2sdk/j2sdk-precompiled-${MV} &&
|
|
|
|
export PATH=$PATH:${JAVA_HOME}/bin</userinput></screen>
|
2002-08-10 10:42:59 +08:00
|
|
|
|
2003-01-30 16:04:11 +08:00
|
|
|
<para>Unzip and patch the source:</para>
|
|
|
|
|
2003-02-01 01:36:22 +08:00
|
|
|
<para><screen><userinput>VERSION=&j2sdk-src-version; &&
|
2003-01-30 16:04:11 +08:00
|
|
|
V=`echo $VERSION | sed -e "s/\./_/g"` &&
|
|
|
|
unzip j2sdk-${V}-src-scsl.zip &&
|
|
|
|
unzip j2sdk-${V}-mozilla_headers-unix.zip &&
|
2003-09-21 06:28:42 +08:00
|
|
|
patch -Np1 -i j2sdk-${VERSION}-gcc33-1.patch &&
|
2003-01-30 16:04:11 +08:00
|
|
|
patch -Np1 -i j2sdk-${VERSION}-fix-intl-files.patch &&
|
|
|
|
patch -Np1 -i j2sdk-${VERSION}-link-missing-libs.patch &&
|
|
|
|
patch -Np1 -i j2sdk-${VERSION}-remove-fixed-paths.patch &&
|
|
|
|
patch -Np1 -i j2sdk-${VERSION}-syntax-fixes.patch &&
|
2003-02-01 01:36:22 +08:00
|
|
|
patch -Np1 -i j2sdk-${VERSION}-use-included-motif.patch</userinput></screen></para>
|
2003-01-30 16:04:11 +08:00
|
|
|
|
|
|
|
<para>Set some vars which affect the build:</para>
|
2003-02-01 01:36:22 +08:00
|
|
|
<para><screen><userinput>export ALT_BOOTDIR="$JAVA_HOME" &&
|
2003-01-30 16:04:11 +08:00
|
|
|
unset JAVA_HOME &&
|
2003-03-01 00:01:18 +08:00
|
|
|
unset CLASSPATH
|
|
|
|
unset CFLAGS
|
|
|
|
unset CXXFLAGS
|
|
|
|
unset LDFLAGS
|
2003-01-30 16:04:11 +08:00
|
|
|
export ALT_DEVTOOLS_PATH="/usr/bin" &&
|
|
|
|
export BUILD_NUMBER="blfs-`date +%s`" &&
|
|
|
|
export DEV_ONLY=true &&
|
|
|
|
export ALT_MOZILLA_PATH=$PWD &&
|
|
|
|
export INSANE=true &&
|
|
|
|
export MAKE_VERBOSE=true &&
|
2003-02-01 01:36:22 +08:00
|
|
|
export ALT_CACERTS_FILE=${ALT_BOOTDIR}/jre/lib/security/cacerts</userinput></screen></para>
|
2003-01-30 16:04:11 +08:00
|
|
|
|
2003-09-21 23:07:05 +08:00
|
|
|
<para>Additionally, if you would like to make in parallel, add the following (adjust
|
|
|
|
<envar>MAKE_PARALLEL</envar> to your liking):</para>
|
|
|
|
<para><screen><userinput>export HOTSPOT_BUILD_JOBS=$MAKE_PARALLEL</userinput></screen></para>
|
|
|
|
|
2003-04-02 02:10:29 +08:00
|
|
|
<para>The included motif doesn't build properly with the current glibc/xfree86.
|
|
|
|
A solution is to build the motif library before compiling the j2sdk. Note that
|
|
|
|
the motif build fails during the first run owing to some syntax error. The
|
|
|
|
brute force and easiest solution is to rerun the make command:)</para>
|
|
|
|
|
|
|
|
<para><screen><userinput>cd motif/lib/Xm &&
|
|
|
|
make || make &&
|
|
|
|
cd ../../..</userinput></screen></para>
|
|
|
|
|
2003-03-01 00:01:18 +08:00
|
|
|
<para>Make and Install j2sdk with the following commands. There will be a lot of
|
|
|
|
messages about missing files that look like errors. As long as the build doesn't
|
|
|
|
stop, the messages are harmless, so ignore them.</para>
|
2003-01-30 16:04:11 +08:00
|
|
|
|
2003-02-01 01:36:22 +08:00
|
|
|
<para><screen><userinput>cd control/make &&
|
2003-01-30 16:04:11 +08:00
|
|
|
make &&
|
|
|
|
cd ../.. &&
|
|
|
|
cd control/build/linux-i?86 &&
|
2003-02-23 05:21:43 +08:00
|
|
|
cp -a j2sdk-image /opt/j2sdk/j2sdk-&j2sdk-src-version;</userinput></screen></para>
|
2002-08-10 10:42:59 +08:00
|
|
|
|
|
|
|
</sect2>
|
|
|
|
|