[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 |
|
---|
[1ea79a1] | 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>
|
---|
[74c1100] | 10 |
|
---|
[06aea651] | 11 | <screen><userinput><command>VERSION=&j2sdk-bin-version; &&
|
---|
[1bf950c] | 12 | MV=`echo $VERSION | cut -d "_" -f 1,1` &&
|
---|
| 13 | V=`echo ${VERSION} | sed -e "s/\./_/g"` &&
|
---|
[9255931] | 14 | sed -i "s:^PATH=.*::" j2sdk-${V}-linux-i?86.bin &&
|
---|
[5496648] | 15 | chmod +x j2sdk-${V}-linux-i?86.bin &&
|
---|
[9255931] | 16 | mkdir -p bin &&
|
---|
| 17 | ln -sf /bin/true bin/more &&
|
---|
| 18 | yes | PATH=$PWD/bin:$PATH ./j2sdk-${V}-linux-i?86.bin &&
|
---|
[1bf950c] | 19 | cd j2sdk${VERSION} &&
|
---|
| 20 | install -d /opt/j2sdk/j2sdk-precompiled-${MV} &&
|
---|
[06aea651] | 21 | mv * /opt/j2sdk/j2sdk-precompiled-${MV}</command></userinput></screen>
|
---|
[74c1100] | 22 |
|
---|
[1ea79a1] | 23 | <para>The binary version is now installed. </para>
|
---|
[74c1100] | 24 |
|
---|
[ce2d956] | 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
|
---|
[1bf950c] | 27 | section.</para>
|
---|
[74c1100] | 28 |
|
---|
[06aea651] | 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>
|
---|
[74c1100] | 32 |
|
---|
[9255931] | 33 | <para>Unzip the source:</para>
|
---|
[1bf950c] | 34 |
|
---|
[06aea651] | 35 | <screen><userinput><command>VERSION=&j2sdk-src-version; &&
|
---|
[1bf950c] | 36 | V=`echo $VERSION | sed -e "s/\./_/g"` &&
|
---|
| 37 | unzip j2sdk-${V}-src-scsl.zip &&
|
---|
| 38 | unzip j2sdk-${V}-mozilla_headers-unix.zip &&
|
---|
[9255931] | 39 | unzip j2sdk-${V}-bin-scsl.zip</command></userinput></screen>
|
---|
| 40 |
|
---|
| 41 | <para>Apply all the patches downloaded above.</para>
|
---|
| 42 |
|
---|
[3f60904] | 43 | <screen><userinput><command>for PATCH in fix-inline-asm-1 gcc33-1 motif-mkmsgcat \
|
---|
[9255931] | 44 | remove-debug-image remove-fixed-paths-1 \
|
---|
| 45 | static_cxx
|
---|
| 46 | do
|
---|
[3f60904] | 47 | patch -Np1 -i j2sdk-1.4.2-$PATCH.patch
|
---|
[9255931] | 48 | done</command></userinput></screen>
|
---|
| 49 |
|
---|
| 50 | <para>Set/unset some variables which affect the build:</para>
|
---|
[06aea651] | 51 | <screen><userinput><command>export ALT_BOOTDIR="$JAVA_HOME" &&
|
---|
[1bf950c] | 52 | unset JAVA_HOME &&
|
---|
[b02f257] | 53 | unset CLASSPATH
|
---|
| 54 | unset CFLAGS
|
---|
| 55 | unset CXXFLAGS
|
---|
| 56 | unset LDFLAGS
|
---|
[1bf950c] | 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 &&
|
---|
[06aea651] | 63 | export ALT_CACERTS_FILE=${ALT_BOOTDIR}/jre/lib/security/cacerts</command></userinput></screen>
|
---|
[1bf950c] | 64 |
|
---|
[9255931] | 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 |
|
---|
[06aea651] | 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>
|
---|
[c4f1401] | 72 |
|
---|
[ce2d956] | 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>
|
---|
[0a9287a] | 77 |
|
---|
[06aea651] | 78 | <screen><userinput><command>cd motif/lib/Xm &&
|
---|
[ce2d956] | 79 | make &&
|
---|
[06aea651] | 80 | cd ../../..</command></userinput></screen>
|
---|
[0a9287a] | 81 |
|
---|
[06aea651] | 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>
|
---|
[1bf950c] | 86 |
|
---|
[06aea651] | 87 | <screen><userinput><command>cd control/make &&
|
---|
[1bf950c] | 88 | make &&
|
---|
| 89 | cd ../.. &&
|
---|
| 90 | cd control/build/linux-i?86 &&
|
---|
[06aea651] | 91 | cp -a j2sdk-image /opt/j2sdk/j2sdk-&j2sdk-src-version;</command></userinput></screen>
|
---|
[74c1100] | 92 |
|
---|
| 93 | </sect2>
|
---|
| 94 |
|
---|