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

10.0 10.1 11.0 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 ken/refactor-virt krejzi/svn lazarus nosym perl-modules qt5new systemd-11177 systemd-13485 trunk v5_1 v5_1-pre1 xry111/git-date xry111/git-date-for-trunk xry111/git-date-test
Last change on this file since 5f51d21 was 5f51d21, checked in by Tushar Teredesai <tushar@…>, 17 years ago

Added ash patch for j2sdk

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

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