mirror of
https://github.com/Zeckmathederg/glfs.git
synced 2025-02-07 01:27:16 +08:00
ce2d9568b9
git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@1297 af4574ff-66df-0310-9fd7-8a98e5e911e0
85 lines
3.5 KiB
XML
85 lines
3.5 KiB
XML
<sect2>
|
|
<title>Installation of <application>J2SDK</application></title>
|
|
|
|
<para>Both versions will be installed in parallel. You may choose to keep
|
|
either or both.</para>
|
|
|
|
<para>Installation of the precompiled <acronym>JDK</acronym> 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>
|
|
|
|
<screen><userinput><command>VERSION=&j2sdk-bin-version; &&
|
|
MV=`echo $VERSION | cut -d "_" -f 1,1` &&
|
|
V=`echo ${VERSION} | sed -e "s/\./_/g"` &&
|
|
chmod +x j2sdk-${V}-linux-i?86.bin &&
|
|
./j2sdk-${V}-linux-i?86.bin &&
|
|
cd j2sdk${VERSION} &&
|
|
install -d /opt/j2sdk/j2sdk-precompiled-${MV} &&
|
|
mv * /opt/j2sdk/j2sdk-precompiled-${MV}</command></userinput></screen>
|
|
|
|
<para>The binary version is now installed.</para>
|
|
|
|
<para>If you don't want to compile the source or are not in a postition to download the source
|
|
owing to license restrictions, skip ahead to the configuration
|
|
section.</para>
|
|
|
|
<para>Add the recently compiled <acronym>JDK</acronym> to the path.</para>
|
|
<screen><userinput><command>export JAVA_HOME=/opt/j2sdk/j2sdk-precompiled-${MV} &&
|
|
export PATH=$PATH:${JAVA_HOME}/bin</command></userinput></screen>
|
|
|
|
<para>Unzip and patch the source:</para>
|
|
|
|
<screen><userinput><command>VERSION=&j2sdk-src-version; &&
|
|
V=`echo $VERSION | sed -e "s/\./_/g"` &&
|
|
unzip j2sdk-${V}-src-scsl.zip &&
|
|
unzip j2sdk-${V}-mozilla_headers-unix.zip &&
|
|
patch -Np1 -i j2sdk-${VERSION}-gcc33-1.patch &&
|
|
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 &&
|
|
patch -Np1 -i j2sdk-${VERSION}-motif-mkmsgcat.patch &&
|
|
patch -Np1 -i j2sdk-${VERSION}-use-included-motif.patch</command></userinput></screen>
|
|
|
|
<para>Set some variables which affect the build:</para>
|
|
<screen><userinput><command>export ALT_BOOTDIR="$JAVA_HOME" &&
|
|
unset JAVA_HOME &&
|
|
unset CLASSPATH
|
|
unset CFLAGS
|
|
unset CXXFLAGS
|
|
unset LDFLAGS
|
|
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 &&
|
|
export ALT_CACERTS_FILE=${ALT_BOOTDIR}/jre/lib/security/cacerts</command></userinput></screen>
|
|
|
|
<para>Additionally, if you would like to make in parallel, add the following
|
|
(adjust <envar>MAKE_PARALLEL</envar> to your liking):</para>
|
|
<screen><userinput><command>export HOTSPOT_BUILD_JOBS=$MAKE_PARALLEL</command></userinput></screen>
|
|
|
|
<para>If the included <application>Motif</application> doesn't build properly, the
|
|
error is noticed much later in the build.
|
|
A solution is to build the <application>Motif</application>
|
|
library before compiling the <application>J2SDK</application>.</para>
|
|
|
|
<screen><userinput><command>cd motif/lib/Xm &&
|
|
make &&
|
|
cd ../../..</command></userinput></screen>
|
|
|
|
<para>Make and Install <application>J2SDK</application> 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>
|
|
|
|
<screen><userinput><command>cd control/make &&
|
|
make &&
|
|
cd ../.. &&
|
|
cd control/build/linux-i?86 &&
|
|
cp -a j2sdk-image /opt/j2sdk/j2sdk-&j2sdk-src-version;</command></userinput></screen>
|
|
|
|
</sect2>
|
|
|