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