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, change
|
---|
8 | the executable bit for the downloaded file, change to the directory where you
|
---|
9 | want it installed and execute the downloaded file.</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 | chmod +x j2sdk-${V}-linux-i?86.bin &&
|
---|
15 | ./j2sdk-${V}-linux-i?86.bin &&
|
---|
16 | cd j2sdk${VERSION} &&
|
---|
17 | install -d /opt/j2sdk/j2sdk-precompiled-${MV} &&
|
---|
18 | mv * /opt/j2sdk/j2sdk-precompiled-${MV}</command></userinput></screen>
|
---|
19 |
|
---|
20 | <para>The binary version is now installed.</para>
|
---|
21 |
|
---|
22 | <para>If you don't want to compile the source, skip ahead to the configuration
|
---|
23 | section.</para>
|
---|
24 |
|
---|
25 | <para>Add the recently compiled <acronym>JDK</acronym> to the path.</para>
|
---|
26 | <screen><userinput><command>export JAVA_HOME=/opt/j2sdk/j2sdk-precompiled-${MV} &&
|
---|
27 | export PATH=$PATH:${JAVA_HOME}/bin</command></userinput></screen>
|
---|
28 |
|
---|
29 | <para>Unzip and patch the source:</para>
|
---|
30 |
|
---|
31 | <screen><userinput><command>VERSION=&j2sdk-src-version; &&
|
---|
32 | V=`echo $VERSION | sed -e "s/\./_/g"` &&
|
---|
33 | unzip j2sdk-${V}-src-scsl.zip &&
|
---|
34 | unzip j2sdk-${V}-mozilla_headers-unix.zip &&
|
---|
35 | patch -Np1 -i j2sdk-${VERSION}-gcc33-1.patch &&
|
---|
36 | patch -Np1 -i j2sdk-${VERSION}-fix-intl-files.patch &&
|
---|
37 | patch -Np1 -i j2sdk-${VERSION}-link-missing-libs.patch &&
|
---|
38 | patch -Np1 -i j2sdk-${VERSION}-remove-fixed-paths.patch &&
|
---|
39 | patch -Np1 -i j2sdk-${VERSION}-syntax-fixes.patch &&
|
---|
40 | patch -Np1 -i j2sdk-${VERSION}-use-included-motif.patch</command></userinput></screen>
|
---|
41 |
|
---|
42 | <para>Set some vars which affect the build:</para>
|
---|
43 | <screen><userinput><command>export ALT_BOOTDIR="$JAVA_HOME" &&
|
---|
44 | unset JAVA_HOME &&
|
---|
45 | unset CLASSPATH
|
---|
46 | unset CFLAGS
|
---|
47 | unset CXXFLAGS
|
---|
48 | unset LDFLAGS
|
---|
49 | export ALT_DEVTOOLS_PATH="/usr/bin" &&
|
---|
50 | export BUILD_NUMBER="blfs-`date +%s`" &&
|
---|
51 | export DEV_ONLY=true &&
|
---|
52 | export ALT_MOZILLA_PATH=$PWD &&
|
---|
53 | export INSANE=true &&
|
---|
54 | export MAKE_VERBOSE=true &&
|
---|
55 | export ALT_CACERTS_FILE=${ALT_BOOTDIR}/jre/lib/security/cacerts</command></userinput></screen>
|
---|
56 |
|
---|
57 | <para>Additionally, if you would like to make in parallel, add the following
|
---|
58 | (adjust <envar>MAKE_PARALLEL</envar> to your liking):</para>
|
---|
59 | <screen><userinput><command>export HOTSPOT_BUILD_JOBS=$MAKE_PARALLEL</command></userinput></screen>
|
---|
60 |
|
---|
61 | <para>The included <application>Motif</application> doesn't build properly with
|
---|
62 | the current <application>Glibc</application>/<application>XFree86
|
---|
63 | </application>. A solution is to build the <application>Motif</application>
|
---|
64 | library before compiling the <application>J2SDK</application>. Note that
|
---|
65 | the <application>Motif</application> build fails during the first run owing to
|
---|
66 | some syntax error. The brute force and easiest solution is to rerun the
|
---|
67 | <command>make</command> command:)</para>
|
---|
68 |
|
---|
69 | <screen><userinput><command>cd motif/lib/Xm &&
|
---|
70 | make || make &&
|
---|
71 | cd ../../..</command></userinput></screen>
|
---|
72 |
|
---|
73 | <para>Make and Install <application>J2SDK</application> with the following
|
---|
74 | commands. There will be a lot of messages about missing files that look like
|
---|
75 | errors. As long as the build doesn't stop, the messages are harmless, so ignore
|
---|
76 | them.</para>
|
---|
77 |
|
---|
78 | <screen><userinput><command>cd control/make &&
|
---|
79 | make &&
|
---|
80 | cd ../.. &&
|
---|
81 | cd control/build/linux-i?86 &&
|
---|
82 | cp -a j2sdk-image /opt/j2sdk/j2sdk-&j2sdk-src-version;</command></userinput></screen>
|
---|
83 |
|
---|
84 | </sect2>
|
---|
85 |
|
---|