[74c1100] | 1 | <sect2>
|
---|
| 2 | <title>Installation of j2sdk</title>
|
---|
| 3 |
|
---|
[1bf950c] | 4 | <para>Both versions will be installed in parallel. You may choose to keep either
|
---|
| 5 | or both.</para>
|
---|
[74c1100] | 6 |
|
---|
[1bf950c] | 7 | <para>Install the binary version of the jdk by running the following commands:</para>
|
---|
[74c1100] | 8 |
|
---|
[1030431] | 9 | <para><screen><userinput>VERSION=&j2sdk-bin-version; &&
|
---|
[1bf950c] | 10 | MV=`echo $VERSION | cut -d "_" -f 1,1` &&
|
---|
| 11 | V=`echo ${VERSION} | sed -e "s/\./_/g"` &&
|
---|
| 12 | T=`grep -a tail j2sdk-${V}-linux-i?86.bin | cut -f 2 -d " "` &&
|
---|
| 13 | tail $T j2sdk-${V}-linux-i?86.bin > install.sfx.$$ &&
|
---|
| 14 | chmod +x install.sfx.$$ &&
|
---|
| 15 | ./install.sfx.$$ &&
|
---|
| 16 | cd j2sdk${VERSION} &&
|
---|
| 17 | install -d /opt/j2sdk/j2sdk-precompiled-${MV} &&
|
---|
[1030431] | 18 | mv * /opt/j2sdk/j2sdk-precompiled-${MV}</userinput></screen></para>
|
---|
[74c1100] | 19 |
|
---|
[1bf950c] | 20 | <para>The binary version is now installed.</para>
|
---|
[74c1100] | 21 |
|
---|
[1bf950c] | 22 | <para>If you don't want to compile the source, skip ahead to the configuration
|
---|
| 23 | section.</para>
|
---|
[74c1100] | 24 |
|
---|
[1bf950c] | 25 | <para>Add the recently compiled JDK to the path.</para>
|
---|
| 26 | <screen><userinput>export JAVA_HOME=/opt/j2sdk/j2sdk-precompiled-${MV} &&
|
---|
| 27 | export PATH=$PATH:${JAVA_HOME}/bin</userinput></screen>
|
---|
[74c1100] | 28 |
|
---|
[1bf950c] | 29 | <para>Unzip and patch the source:</para>
|
---|
| 30 |
|
---|
[1030431] | 31 | <para><screen><userinput>VERSION=&j2sdk-src-version; &&
|
---|
[1bf950c] | 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}-fix-intl-files.patch &&
|
---|
| 36 | patch -Np1 -i j2sdk-${VERSION}-link-missing-libs.patch &&
|
---|
| 37 | patch -Np1 -i j2sdk-${VERSION}-remove-fixed-paths.patch &&
|
---|
| 38 | patch -Np1 -i j2sdk-${VERSION}-syntax-fixes.patch &&
|
---|
[1030431] | 39 | patch -Np1 -i j2sdk-${VERSION}-use-included-motif.patch</userinput></screen></para>
|
---|
[1bf950c] | 40 |
|
---|
| 41 | <para>Set some vars which affect the build:</para>
|
---|
[1030431] | 42 | <para><screen><userinput>export ALT_BOOTDIR="$JAVA_HOME" &&
|
---|
[1bf950c] | 43 | unset JAVA_HOME &&
|
---|
[b02f257] | 44 | unset CLASSPATH
|
---|
| 45 | unset CFLAGS
|
---|
| 46 | unset CXXFLAGS
|
---|
| 47 | unset LDFLAGS
|
---|
[1bf950c] | 48 | export ALT_DEVTOOLS_PATH="/usr/bin" &&
|
---|
| 49 | export BUILD_NUMBER="blfs-`date +%s`" &&
|
---|
| 50 | export DEV_ONLY=true &&
|
---|
| 51 | export ALT_MOZILLA_PATH=$PWD &&
|
---|
| 52 | export INSANE=true &&
|
---|
| 53 | export MAKE_VERBOSE=true &&
|
---|
[1030431] | 54 | export ALT_CACERTS_FILE=${ALT_BOOTDIR}/jre/lib/security/cacerts</userinput></screen></para>
|
---|
[1bf950c] | 55 |
|
---|
[0a9287a] | 56 | <para>The included motif doesn't build properly with the current glibc/xfree86.
|
---|
| 57 | A solution is to build the motif library before compiling the j2sdk. Note that
|
---|
| 58 | the motif build fails during the first run owing to some syntax error. The
|
---|
| 59 | brute force and easiest solution is to rerun the make command:)</para>
|
---|
| 60 |
|
---|
| 61 | <para><screen><userinput>cd motif/lib/Xm &&
|
---|
| 62 | make || make &&
|
---|
| 63 | cd ../../..</userinput></screen></para>
|
---|
| 64 |
|
---|
[b02f257] | 65 | <para>Make and Install j2sdk with the following commands. There will be a lot of
|
---|
| 66 | messages about missing files that look like errors. As long as the build doesn't
|
---|
| 67 | stop, the messages are harmless, so ignore them.</para>
|
---|
[1bf950c] | 68 |
|
---|
[1030431] | 69 | <para><screen><userinput>cd control/make &&
|
---|
[1bf950c] | 70 | make &&
|
---|
| 71 | cd ../.. &&
|
---|
| 72 | cd control/build/linux-i?86 &&
|
---|
[1f77bc8] | 73 | cp -a j2sdk-image /opt/j2sdk/j2sdk-&j2sdk-src-version;</userinput></screen></para>
|
---|
[74c1100] | 74 |
|
---|
| 75 | </sect2>
|
---|
| 76 |
|
---|