source: general/prog/jdk/j2sdk-inst.xml@ dcd8072

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 6.0 6.1 6.2 6.2.0 6.2.0-rc1 6.2.0-rc2 6.3 6.3-rc1 6.3-rc2 6.3-rc3 7.10 7.4 7.5 7.6 7.6-blfs 7.6-systemd 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind gnome kde5-13430 kde5-14269 kde5-14686 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts krejzi/svn lazarus lxqt nosym perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition systemd-11177 systemd-13485 trunk upgradedb v5_1 xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since dcd8072 was 1ea79a1, checked in by Bruce Dubbs <bdubbs@…>, 20 years ago

Typos and punctuation

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@2236 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 3.7 KB
RevLine 
[74c1100]1<sect2>
[06aea651]2<title>Installation of <application>J2SDK</application></title>
[74c1100]3
[06aea651]4<para>Both versions will be installed in parallel. You may choose to keep
5either or both.</para>
[74c1100]6
[1ea79a1]7<para>Installation of the precompiled <acronym>JDK</acronym> is easy:
8create a directory to install from, copy the .bin there, and run the
9following commands:</para>
[74c1100]10
[06aea651]11<screen><userinput><command>VERSION=&j2sdk-bin-version; &amp;&amp;
[1bf950c]12MV=`echo $VERSION | cut -d "_" -f 1,1` &amp;&amp;
13V=`echo ${VERSION} | sed -e "s/\./_/g"` &amp;&amp;
[9255931]14sed -i "s:^PATH=.*::" j2sdk-${V}-linux-i?86.bin &amp;&amp;
[5496648]15chmod +x j2sdk-${V}-linux-i?86.bin &amp;&amp;
[9255931]16mkdir -p bin &amp;&amp;
17ln -sf /bin/true bin/more &amp;&amp;
18yes | PATH=$PWD/bin:$PATH ./j2sdk-${V}-linux-i?86.bin &amp;&amp;
[1bf950c]19cd j2sdk${VERSION} &amp;&amp;
20install -d /opt/j2sdk/j2sdk-precompiled-${MV} &amp;&amp;
[06aea651]21mv * /opt/j2sdk/j2sdk-precompiled-${MV}</command></userinput></screen>
[74c1100]22
[1ea79a1]23<para>The binary version is now installed. </para>
[74c1100]24
[ce2d956]25<para>If you don't want to compile the source or are not in a postition to download the source
26owing to license restrictions, skip ahead to the configuration
[1bf950c]27section.</para>
[74c1100]28
[06aea651]29<para>Add the recently compiled <acronym>JDK</acronym> to the path.</para>
30<screen><userinput><command>export JAVA_HOME=/opt/j2sdk/j2sdk-precompiled-${MV} &amp;&amp;
31export PATH=$PATH:${JAVA_HOME}/bin</command></userinput></screen>
[74c1100]32
[9255931]33<para>Unzip the source:</para>
[1bf950c]34
[06aea651]35<screen><userinput><command>VERSION=&j2sdk-src-version; &amp;&amp;
[1bf950c]36V=`echo $VERSION | sed -e "s/\./_/g"` &amp;&amp;
37unzip j2sdk-${V}-src-scsl.zip &amp;&amp;
38unzip j2sdk-${V}-mozilla_headers-unix.zip &amp;&amp;
[9255931]39unzip j2sdk-${V}-bin-scsl.zip</command></userinput></screen>
40
41<para>Apply all the patches downloaded above.</para>
42
[3f60904]43<screen><userinput><command>for PATCH in fix-inline-asm-1 gcc33-1 motif-mkmsgcat \
[9255931]44 remove-debug-image remove-fixed-paths-1 \
45 static_cxx
46do
[3f60904]47 patch -Np1 -i j2sdk-1.4.2-$PATCH.patch
[9255931]48done</command></userinput></screen>
49
50<para>Set/unset some variables which affect the build:</para>
[06aea651]51<screen><userinput><command>export ALT_BOOTDIR="$JAVA_HOME" &amp;&amp;
[1bf950c]52unset JAVA_HOME &amp;&amp;
[b02f257]53unset CLASSPATH
54unset CFLAGS
55unset CXXFLAGS
56unset LDFLAGS
[1bf950c]57export ALT_DEVTOOLS_PATH="/usr/bin" &amp;&amp;
58export BUILD_NUMBER="blfs-`date +%s`" &amp;&amp;
59export DEV_ONLY=true &amp;&amp;
60export ALT_MOZILLA_PATH=$PWD &amp;&amp;
61export INSANE=true &amp;&amp;
62export MAKE_VERBOSE=true &amp;&amp;
[06aea651]63export ALT_CACERTS_FILE=${ALT_BOOTDIR}/jre/lib/security/cacerts</command></userinput></screen>
[1bf950c]64
[9255931]65<warning><para>Setting CFLAGS/CXXFLAGS/LDFLAGS is guaranteed to make the build fail.
66If you are interested in optimizing the build, set OTHER_CFLAGS/OTHER_CXXFLAGS/OTHER_LDFLAGS
67instead.</para></warning>
68
[06aea651]69<para>Additionally, if you would like to make in parallel, add the following
70(adjust <envar>MAKE_PARALLEL</envar> to your liking):</para>
71<screen><userinput><command>export HOTSPOT_BUILD_JOBS=$MAKE_PARALLEL</command></userinput></screen>
[c4f1401]72
[ce2d956]73<para>If the included <application>Motif</application> doesn't build properly, the
74error is noticed much later in the build.
75A solution is to build the <application>Motif</application>
76library before compiling the <application>J2SDK</application>.</para>
[0a9287a]77
[06aea651]78<screen><userinput><command>cd motif/lib/Xm &amp;&amp;
[ce2d956]79make &amp;&amp;
[06aea651]80cd ../../..</command></userinput></screen>
[0a9287a]81
[06aea651]82<para>Make and Install <application>J2SDK</application> with the following
83commands. There will be a lot of messages about missing files that look like
84errors. As long as the build doesn't stop, the messages are harmless, so ignore
85them.</para>
[1bf950c]86
[06aea651]87<screen><userinput><command>cd control/make &amp;&amp;
[1bf950c]88make &amp;&amp;
89cd ../.. &amp;&amp;
90cd control/build/linux-i?86 &amp;&amp;
[06aea651]91cp -a j2sdk-image /opt/j2sdk/j2sdk-&j2sdk-src-version;</command></userinput></screen>
[74c1100]92
93</sect2>
94
Note: See TracBrowser for help on using the repository browser.