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