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