[52d29f7] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[ff769b8c] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
---|
[52d29f7] | 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 |
|
---|
[99a7cb0] | 7 | <!ENTITY jdk-download-source "https://tiger.dev.java.net/jdk_5_0_05.html">
|
---|
[5f0bab7] | 8 | <!ENTITY jdk-download-binary "http://java.sun.com/j2se/1.5.0/download.jsp">
|
---|
[60a31248] | 9 | <!ENTITY jdk-source-md5sum "&sources-anduin-http;/j/jdk-&jdk-src-version;.md5sums">
|
---|
[f86db562] | 10 | <!ENTITY jdk-bin-md5sum "3cdad4a383b93680f02f6f06198c2227">
|
---|
| 11 | <!ENTITY jdk-bin-size "46.7 MB">
|
---|
[cb61e3a8] | 12 | <!ENTITY jdk-src-size "64.4 MB (three .jar files)">
|
---|
| 13 | <!ENTITY jdk-src-buildsize "1553 MB">
|
---|
[b26eca2] | 14 | <!ENTITY jdk-time "29 SBU">
|
---|
[52d29f7] | 15 | ]>
|
---|
| 16 |
|
---|
[5f0bab7] | 17 | <sect1 id="jdk" xreflabel="JDK-&jdk-src-version;">
|
---|
[4378f935] | 18 | <?dbhtml filename="jdk.html" ?>
|
---|
| 19 |
|
---|
| 20 | <sect1info>
|
---|
| 21 | <othername>$LastChangedBy$</othername>
|
---|
| 22 | <date>$Date$</date>
|
---|
[256ee72c] | 23 | <keywordset>
|
---|
| 24 | <keyword role="package">NONE</keyword>
|
---|
[22ac237] | 25 | <keyword role="ftpdir">jdk</keyword>
|
---|
[256ee72c] | 26 | </keywordset>
|
---|
[4378f935] | 27 | </sect1info>
|
---|
| 28 |
|
---|
[5eaa6873] | 29 | <title>JDK-&jdk-src-version;</title>
|
---|
[4378f935] | 30 |
|
---|
| 31 | <indexterm zone="jdk">
|
---|
| 32 | <primary sortas="a-JDK">JDK</primary>
|
---|
| 33 | </indexterm>
|
---|
| 34 |
|
---|
| 35 | <sect2 role="package">
|
---|
| 36 | <title>Introduction to JDK</title>
|
---|
| 37 |
|
---|
[dae2ba0b] | 38 | <para>The <application>JDK</application> package contains
|
---|
[bccbdaea] | 39 | Sun's <application>Java</application> development environment. This is
|
---|
| 40 | useful for developing <application>Java</application> programs and provides
|
---|
| 41 | the runtime environment necessary to run <application>Java</application>
|
---|
[cb61e3a8] | 42 | programs. It also includes a plug-in for browsers so that they can be
|
---|
[4378f935] | 43 | <application>Java</application> aware.</para>
|
---|
| 44 |
|
---|
[bccbdaea] | 45 | <para>The <application>JDK</application> comes in two flavors, a
|
---|
| 46 | precompiled binary and a source package. Previously, the plugin included
|
---|
[cb61e3a8] | 47 | in the <application>JDK</application> binary package was unusable on LFS
|
---|
[bccbdaea] | 48 | owing to incompatibilities with <application>GCC</application>-3 compiled
|
---|
[cb61e3a8] | 49 | browsers. This is not the case anymore.</para>
|
---|
[4378f935] | 50 |
|
---|
| 51 | <para>In order to use the source code and patches, you must read and agree
|
---|
[473131d] | 52 | to the Sun <ulink url="http://www.java.net/jrl.csp"> Java Research
|
---|
| 53 | License</ulink> or optionally, the Sun <ulink
|
---|
| 54 | url="http://java.net/jiul.csp">Java Internal Use License</ulink>. In
|
---|
| 55 | addition, the source code is not allowed to be downloaded to some
|
---|
| 56 | countries, so for users in those countries, the binary is the only
|
---|
| 57 | option.</para>
|
---|
[cb61e3a8] | 58 |
|
---|
[6473e74] | 59 | <para>You will first need to download and install the binary version of the
|
---|
[b26eca2] | 60 | <application>JDK</application>.</para>
|
---|
[6473e74] | 61 |
|
---|
[b26eca2] | 62 | <para>To build from the source, you will also need to download the
|
---|
| 63 | additional files and patches to complete the source build as detailed
|
---|
| 64 | below.</para>
|
---|
[4378f935] | 65 |
|
---|
| 66 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 67 | <itemizedlist spacing="compact">
|
---|
| 68 | <listitem>
|
---|
[6473e74] | 69 | <para>Binary download: <ulink url="&jdk-download-binary;"/>
|
---|
[b26eca2] | 70 | (to download jdk-&jdk-bin-string;-linux-i586.bin)</para>
|
---|
[4378f935] | 71 | </listitem>
|
---|
| 72 | <listitem>
|
---|
| 73 | <para>Download MD5 sum (binary): &jdk-bin-md5sum;</para>
|
---|
| 74 | </listitem>
|
---|
| 75 | <listitem>
|
---|
[b26eca2] | 76 | <para>Source download: <ulink url="&jdk-download-source;"/>
|
---|
| 77 | (to download jdk-&jdk-src-string;-fcs-src-b05-jrl-13_oct_2005.jar (or
|
---|
| 78 | optionally the JIUL version),
|
---|
| 79 | jdk-&jdk-src-string;-fcs-bin-b05-13_oct_2005.jar, and
|
---|
| 80 | jdk-&jdk-src-string;-mozilla_headers-b05-unix-26_aug_2005.jar)</para>
|
---|
[4378f935] | 81 | </listitem>
|
---|
[428434e7] | 82 |
|
---|
[4378f935] | 83 | <listitem>
|
---|
[6473e74] | 84 | <para>Download MD5 sums (source):
|
---|
[b26eca2] | 85 | <simplelist>
|
---|
| 86 | <member>215c5175e54c2facccc2c7845e339725
|
---|
[6473e74] | 87 | jdk-&jdk-src-string;-fcs-bin-b05-13_oct_2005.jar
|
---|
[b26eca2] | 88 | </member>
|
---|
| 89 | <member>884dd87faa082d294f725857c895b6f6
|
---|
| 90 | jdk-&jdk-src-string;-fcs-src-b05-jrl-13_oct_2005.jar
|
---|
| 91 | </member>
|
---|
| 92 | <member>3a3627ab55c6a63cddc90d5b3fad4b83
|
---|
| 93 | jdk-&jdk-src-string;-mozilla_headers-b05-unix-26_aug_2005.jar
|
---|
| 94 | </member>
|
---|
| 95 | </simplelist>
|
---|
| 96 | </para>
|
---|
[4378f935] | 97 | </listitem>
|
---|
[428434e7] | 98 |
|
---|
[4378f935] | 99 | <listitem>
|
---|
| 100 | <para>Download size (binary): &jdk-bin-size;</para>
|
---|
| 101 | </listitem>
|
---|
| 102 | <listitem>
|
---|
| 103 | <para>Download size (source): &jdk-src-size;</para>
|
---|
| 104 | </listitem>
|
---|
| 105 | <listitem>
|
---|
| 106 | <para>Estimated disk space required: &jdk-src-buildsize;</para>
|
---|
| 107 | </listitem>
|
---|
| 108 | <listitem>
|
---|
| 109 | <para>Estimated build time: &jdk-time;</para>
|
---|
| 110 | </listitem>
|
---|
| 111 | </itemizedlist>
|
---|
| 112 |
|
---|
| 113 | <bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
---|
| 114 |
|
---|
| 115 | <bridgehead renderas="sect4">Required Patches</bridgehead>
|
---|
| 116 | <itemizedlist spacing='compact'>
|
---|
| 117 | <listitem>
|
---|
| 118 | <para><ulink
|
---|
[d71866ba] | 119 | url="&patch-root;/jdk-&jdk-src-version;-gcc4-1.patch"/></para>
|
---|
[4378f935] | 120 | </listitem>
|
---|
| 121 | <listitem>
|
---|
[dae2ba0b] | 122 | <para><ulink
|
---|
[985c02e] | 123 | url="&patch-root;/jdk-&jdk-src-version;-motif_fixes-1.patch"/></para>
|
---|
[4378f935] | 124 | </listitem>
|
---|
| 125 | <listitem>
|
---|
| 126 | <para><ulink
|
---|
| 127 | url="&patch-root;/jdk-&jdk-src-version;-nptl-1.patch"/></para></listitem>
|
---|
| 128 | <listitem>
|
---|
[dae2ba0b] | 129 | <para><ulink
|
---|
[4378f935] | 130 | url="&patch-root;/jdk-&jdk-src-version;-remove_broken_demo-1.patch"/></para>
|
---|
| 131 | </listitem>
|
---|
| 132 | <listitem>
|
---|
| 133 | <para><ulink
|
---|
[d71866ba] | 134 | url="&patch-root;/jdk-&jdk-src-version;-remove_fixed_paths-1.patch"/></para>
|
---|
[4378f935] | 135 | </listitem>
|
---|
[b26eca2] | 136 | <listitem>
|
---|
| 137 | <para><ulink
|
---|
| 138 | url="&patch-root;/jdk-&jdk-src-version;-xorg-6.8.1-1.patch"/></para>
|
---|
| 139 | </listitem>
|
---|
[4378f935] | 140 | </itemizedlist>
|
---|
| 141 |
|
---|
| 142 | <bridgehead renderas="sect4">Recommended Patches</bridgehead>
|
---|
| 143 | <itemizedlist spacing='compact'>
|
---|
| 144 | <listitem>
|
---|
[dae2ba0b] | 145 | <para><ulink
|
---|
[4378f935] | 146 | url="&patch-root;/jdk-&jdk-src-version;-remove_debug_image-1.patch"/>
|
---|
[bdf7e1b] | 147 | (skips compiling of the <application>JDK</application> debug image)</para>
|
---|
[4378f935] | 148 | </listitem>
|
---|
| 149 | <listitem>
|
---|
[dae2ba0b] | 150 | <para><ulink
|
---|
[4378f935] | 151 | url="&patch-root;/jdk-&jdk-src-version;-static_cxx-1.patch"/>
|
---|
[bdf7e1b] | 152 | (forces dynamic linking to <application>GCC</application> libs)</para></listitem>
|
---|
[1d61428d] | 153 | </itemizedlist>
|
---|
| 154 |
|
---|
[42a04581] | 155 | <bridgehead renderas="sect3">JDK Dependencies</bridgehead>
|
---|
[4378f935] | 156 |
|
---|
[5eaa6873] | 157 | <bridgehead renderas="sect4">Required (to Build JDK from Source)</bridgehead>
|
---|
[e77976f] | 158 | <para role="required"><xref linkend="x-window-system"/>,
|
---|
[dae2ba0b] | 159 | <xref linkend="zip"/>,
|
---|
| 160 | <xref linkend="unzip"/>,
|
---|
| 161 | <xref linkend="cpio"/>,
|
---|
[12b5ece] | 162 | <xref linkend="alsa-lib"/>, and
|
---|
[4378f935] | 163 | <xref linkend="tcsh"/></para>
|
---|
| 164 |
|
---|
[1039de3] | 165 | <para condition="html" role="usernotes">User Notes:
|
---|
| 166 | <ulink url="&blfs-wiki;/jdk"/></para>
|
---|
| 167 |
|
---|
[4378f935] | 168 | </sect2>
|
---|
| 169 |
|
---|
| 170 | <sect2 role="installation">
|
---|
| 171 | <title>Installation of JDK</title>
|
---|
| 172 |
|
---|
[b26eca2] | 173 | <para>Both the binary and source built versions will be installed. You may
|
---|
| 174 | choose to keep either or both.</para>
|
---|
[4378f935] | 175 |
|
---|
[d4277d4] | 176 | <tip>
|
---|
| 177 | <para>The <command>./jdk-&jdk-bin-string;-linux-i?86.bin</command>
|
---|
| 178 | command below unpacks the distribution into a
|
---|
| 179 | <filename class='directory'>jdk&jdk-bin-version;</filename> directory.
|
---|
| 180 | You will be required to view, and then accept (by entering a
|
---|
| 181 | <keycap>y</keycap> keypress), a license agreement before any files are
|
---|
| 182 | unpacked. If you are scripting (automating) the build, you'll need to
|
---|
| 183 | account for this. There is information about automating build commands
|
---|
| 184 | in the <xref linkend="automating-builds"/> section of Chapter 2. Towards
|
---|
| 185 | the end of this section, specific information for automating this type of
|
---|
| 186 | installation is discussed.</para>
|
---|
| 187 | </tip>
|
---|
| 188 |
|
---|
[b26eca2] | 189 | <para>Normally in BLFS, the files are unpacked into a subdirectory
|
---|
[6473e74] | 190 | and the starting point for the installation procedures is that
|
---|
[b26eca2] | 191 | location. For this application only, start in the directory where all
|
---|
| 192 | the downloaded files are located.</para>
|
---|
| 193 |
|
---|
[4378f935] | 194 | <para>Install the precompiled <application>JDK</application> with the
|
---|
| 195 | following commands:</para>
|
---|
| 196 |
|
---|
[b26eca2] | 197 | <screen><userinput>cp jdk-&jdk-bin-string;-linux-i?86.bin jdk-mod.bin &&
|
---|
| 198 | sed -i "s:^PATH=.*::" jdk-mod.bin &&
|
---|
| 199 | chmod -v +x jdk-mod.bin &&
|
---|
| 200 | ./jdk-mod.bin</userinput></screen>
|
---|
[2a7340c2] | 201 |
|
---|
[4378f935] | 202 | <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
|
---|
[2a7340c2] | 203 |
|
---|
[b26eca2] | 204 | <screen role="root"><userinput>cd jdk&jdk-bin-version; &&
|
---|
| 205 | install -v -d /opt/jdk/jdk-precompiled-&jdk-bin-version; &&
|
---|
[cb61e3a8] | 206 | mv -v * /opt/jdk/jdk-precompiled-&jdk-bin-version; &&
|
---|
[f86db562] | 207 | chown -v -R root:root /opt/jdk/jdk-precompiled-&jdk-bin-version; &&
|
---|
[256f9439] | 208 | ln -v -sf motif21/libmawt.so \
|
---|
[b26eca2] | 209 | /opt/jdk/jdk-precompiled-&jdk-bin-version;/jre/lib/i386/ &&
|
---|
| 210 | cd ..</userinput></screen>
|
---|
[014d11ad] | 211 |
|
---|
[4378f935] | 212 | <para>The binary version is now installed.</para>
|
---|
[014d11ad] | 213 |
|
---|
[dae2ba0b] | 214 | <para>If you don't want to compile the source or are not in a position to
|
---|
| 215 | download the source owing to license restrictions, skip ahead to the
|
---|
[4378f935] | 216 | configuration section.</para>
|
---|
[014d11ad] | 217 |
|
---|
[bccbdaea] | 218 | <para>Save the existing path, and append the recently installed
|
---|
[cb61e3a8] | 219 | <application>JDK</application>.</para>
|
---|
[014d11ad] | 220 |
|
---|
[cb61e3a8] | 221 | <screen><userinput>export JAVA_HOME=/opt/jdk/jdk-precompiled-&jdk-bin-version; &&
|
---|
| 222 | export PATH_HOLD=${PATH} &&
|
---|
| 223 | export PATH=${PATH}:${JAVA_HOME}/bin</userinput></screen>
|
---|
[014d11ad] | 224 |
|
---|
[b89c7ca] | 225 | <para>The source code is contained in a self-extracting
|
---|
[bccbdaea] | 226 | <filename class='extension'>jar</filename> file. You
|
---|
| 227 | will need to be in a windowed environment to extract the sources.
|
---|
[cb61e3a8] | 228 | Create a directory to store the extracted sources. Choose the newly
|
---|
| 229 | created <filename class="directory">jdk-build</filename> directory
|
---|
| 230 | when prompted for the target directory.</para>
|
---|
[014d11ad] | 231 |
|
---|
[4378f935] | 232 | <screen><userinput>mkdir jdk-build &&
|
---|
[5f0bab7] | 233 | cd jdk-build &&
|
---|
[cb61e3a8] | 234 | for JAR in ../jdk-&jdk-src-string;*.jar
|
---|
| 235 | do java -jar ${JAR}
|
---|
| 236 | done</userinput></screen>
|
---|
[014d11ad] | 237 |
|
---|
[b89c7ca] | 238 | <para>Apply all the patches downloaded above:</para>
|
---|
[014d11ad] | 239 |
|
---|
[4378f935] | 240 | <screen><userinput>for PATCH in ../jdk-&jdk-src-version;*.patch
|
---|
[5f0bab7] | 241 | do patch -Np1 -i ${PATCH}
|
---|
[4378f935] | 242 | done</userinput></screen>
|
---|
[014d11ad] | 243 |
|
---|
[985c02e] | 244 | <para>If your X Window System is installed in any prefix other than
|
---|
| 245 | <filename class="directory">/usr/X11R6</filename>, adjust as necessary and
|
---|
| 246 | execute the following command:</para>
|
---|
| 247 |
|
---|
[1039de3] | 248 | <screen><userinput>find . -type f -exec sed -i 's@/usr/X11R6@<replaceable></usr></replaceable>@g' {} \;</userinput></screen>
|
---|
[985c02e] | 249 |
|
---|
[4378f935] | 250 | <para>Set/unset some variables which affect the build:</para>
|
---|
[2a7340c2] | 251 |
|
---|
[4378f935] | 252 | <screen><userinput>export ALT_BOOTDIR="$JAVA_HOME" &&
|
---|
[52d29f7] | 253 | unset JAVA_HOME &&
|
---|
| 254 | unset CLASSPATH
|
---|
| 255 | unset CFLAGS
|
---|
| 256 | unset CXXFLAGS
|
---|
| 257 | unset LDFLAGS
|
---|
| 258 | export ALT_DEVTOOLS_PATH="/usr/bin" &&
|
---|
[99a7cb0] | 259 | export BUILD_NUMBER="update-05" &&
|
---|
[52d29f7] | 260 | export DEV_ONLY=true &&
|
---|
[cb61e3a8] | 261 | export ALT_MOZILLA_HEADERS_PATH=$PWD/share/plugin/ &&
|
---|
[52d29f7] | 262 | export INSANE=true &&
|
---|
| 263 | export MAKE_VERBOSE=true &&
|
---|
[4378f935] | 264 | export ALT_CACERTS_FILE=${ALT_BOOTDIR}/jre/lib/security/cacerts</userinput></screen>
|
---|
[014d11ad] | 265 |
|
---|
[4378f935] | 266 | <warning>
|
---|
[dae2ba0b] | 267 | <para>Setting CFLAGS/CXXFLAGS/LDFLAGS is guaranteed to make the build
|
---|
[bccbdaea] | 268 | fail. If you are interested in optimizing the build, set
|
---|
| 269 | OTHER_CFLAGS/OTHER_CXXFLAGS/OTHER_LDFLAGS instead. -O3, even in
|
---|
[0b584261] | 270 | OTHER_C{,XX}FLAGS, is known to cause a build failure.</para>
|
---|
[4378f935] | 271 | </warning>
|
---|
[014d11ad] | 272 |
|
---|
[40d6bab] | 273 | <para>Additionally, if you would like to <command>make</command> in
|
---|
| 274 | parallel, add the following:</para>
|
---|
[2a7340c2] | 275 |
|
---|
[1039de3] | 276 | <screen><userinput>export HOTSPOT_BUILD_JOBS=<replaceable><3></replaceable></userinput></screen>
|
---|
[014d11ad] | 277 |
|
---|
[4378f935] | 278 | <para>Build the <application>JDK</application> with the following
|
---|
| 279 | commands. There will be a lot of messages about missing files that look like
|
---|
[bdf7e1b] | 280 | errors. These are caused by not meeting the expected build environment
|
---|
[dae2ba0b] | 281 | (Red Hat). As long as the build doesn't stop, the messages
|
---|
[4378f935] | 282 | are harmless.</para>
|
---|
[014d11ad] | 283 |
|
---|
[4378f935] | 284 | <screen><userinput>cd control/make &&
|
---|
[52d29f7] | 285 | make &&
|
---|
[4378f935] | 286 | cd ../build/linux-i?86</userinput></screen>
|
---|
[2a7340c2] | 287 |
|
---|
[dae2ba0b] | 288 | <para>Now, as the <systemitem class="username">root</systemitem> user,
|
---|
[4378f935] | 289 | install the <application>JDK</application>:</para>
|
---|
[2a7340c2] | 290 |
|
---|
[4378f935] | 291 | <screen role="root"><userinput>cp -v -a j2sdk-image /opt/jdk/jdk-&jdk-src-version; &&
|
---|
[61e058b] | 292 | chown -v -R root:root /opt/jdk/jdk-&jdk-src-version; &&
|
---|
[6dd0164] | 293 | ln -sf motif21/libmawt.so /opt/jdk/jdk-&jdk-src-version;/jre/lib/i386/</userinput></screen>
|
---|
[2a7340c2] | 294 |
|
---|
[40d6bab] | 295 | <para>Restore the unprivileged user's environment using the following
|
---|
| 296 | commands:</para>
|
---|
[2a7340c2] | 297 |
|
---|
[cb61e3a8] | 298 | <screen><userinput>unset ALT_BOOTDIR &&
|
---|
[2a7340c2] | 299 | unset ALT_DEVTOOLS_PATH &&
|
---|
| 300 | unset BUILD_NUMBER &&
|
---|
| 301 | unset DEV_ONLY &&
|
---|
[cb61e3a8] | 302 | unset ALT_MOZILLA_HEADERS_PATH &&
|
---|
[2a7340c2] | 303 | unset INSANE &&
|
---|
| 304 | unset MAKE_VERBOSE &&
|
---|
[cb61e3a8] | 305 | unset ALT_CACERTS_FILE &&
|
---|
| 306 | export PATH=${PATH_HOLD} &&
|
---|
| 307 | unset PATH_HOLD</userinput></screen>
|
---|
[014d11ad] | 308 |
|
---|
[4378f935] | 309 | </sect2>
|
---|
[52d29f7] | 310 |
|
---|
[4378f935] | 311 | <sect2 role="commands">
|
---|
| 312 | <title>Command Explanations</title>
|
---|
[014d11ad] | 313 |
|
---|
[40d6bab] | 314 | <para><command>export ALT_BOOTDIR="$JAVA_HOME"</command>: This variable sets
|
---|
[4378f935] | 315 | the location of the bootstrap <application>JDK</application>.</para>
|
---|
[014d11ad] | 316 |
|
---|
[cb61e3a8] | 317 | <para><command>export ALT_MOZILLA_HEADERS_PATH=$PWD/share/plugin/</command>:
|
---|
| 318 | This tells the build exactly where to find the
|
---|
[bccbdaea] | 319 | <application>Mozilla</application> headers. This has changed since the
|
---|
| 320 | previous version and is not mentioned in the installation documentation
|
---|
[cb61e3a8] | 321 | included with the package source.</para>
|
---|
[014d11ad] | 322 |
|
---|
[4378f935] | 323 | <para><command>export ALT_DEVTOOLS_PATH="/usr/bin"</command>: This
|
---|
| 324 | changes the location where the build finds the needed executables.</para>
|
---|
[014d11ad] | 325 |
|
---|
[dae2ba0b] | 326 | <para><command>export BUILD_NUMBER="blfs-&blfs-version;"</command>:
|
---|
| 327 | This will help you identify the compiled version of the runtime environment
|
---|
| 328 | and virtual machine by appending this information to the version
|
---|
[4378f935] | 329 | string.</para>
|
---|
[014d11ad] | 330 |
|
---|
[4378f935] | 331 | <para><command>export DEV_ONLY=true</command>: This command
|
---|
| 332 | skips compiling the documentation and eliminates a dependency on
|
---|
| 333 | <application>rpm</application>.</para>
|
---|
[014d11ad] | 334 |
|
---|
[4378f935] | 335 | <para><command>unset JAVA_HOME</command>: This clears the
|
---|
[dae2ba0b] | 336 | <envar>JAVA_HOME</envar> variable as recommended by the build
|
---|
[4378f935] | 337 | instructions.</para>
|
---|
[014d11ad] | 338 |
|
---|
[4378f935] | 339 | <para><command>unset CLASSPATH</command>: This clears the
|
---|
[40d6bab] | 340 | <envar>CLASSPATH</envar> variable as recommended by the build
|
---|
[4378f935] | 341 | instructions.</para>
|
---|
[014d11ad] | 342 |
|
---|
[dae2ba0b] | 343 | <para><command>unset CFLAGS/CXXFLAGS...</command>: These variables cause
|
---|
[4378f935] | 344 | miscompilation of the build. Never set them.</para>
|
---|
[014d11ad] | 345 |
|
---|
[dae2ba0b] | 346 | <para><command>export INSANE=true</command>: The certified platform for the
|
---|
| 347 | build is Redhat Enterprise Advanced Server 2.1. This variable ensures that
|
---|
| 348 | all the errors related to compiling on a non-certified platform will be
|
---|
[4378f935] | 349 | displayed as warnings instead of errors.</para>
|
---|
[014d11ad] | 350 |
|
---|
[dae2ba0b] | 351 | <para><command>export MAKE_VERBOSE=true</command>: Allows the compiler
|
---|
[4378f935] | 352 | commands to be displayed on the console.</para>
|
---|
[014d11ad] | 353 |
|
---|
[4378f935] | 354 | <para><command>export ALT_CACERTS_FILE...</command>: Specifies the
|
---|
[dae2ba0b] | 355 | certificate file to use (from the installed binary
|
---|
[4378f935] | 356 | <application>JDK</application>).</para>
|
---|
[014d11ad] | 357 |
|
---|
[bccbdaea] | 358 | <para><command>ln -sf motif21/libmawt.so
|
---|
| 359 | /opt/jdk/jdk-&jdk-src-version;/jre/lib/i386/</command>: This fixes
|
---|
| 360 | linking issues with other applications that expect to find the
|
---|
| 361 | <application>motif</application> libraries with the other
|
---|
[6dd0164] | 362 | <application>JDK</application> libraries.</para>
|
---|
[61e058b] | 363 |
|
---|
[4378f935] | 364 | </sect2>
|
---|
[52d29f7] | 365 |
|
---|
[4378f935] | 366 | <sect2 role="configuration">
|
---|
| 367 | <title>Configuring JDK</title>
|
---|
[014d11ad] | 368 |
|
---|
[4378f935] | 369 | <sect3>
|
---|
| 370 | <title>Configuration Information</title>
|
---|
[014d11ad] | 371 |
|
---|
[bdf7e1b] | 372 | <para>There are now two Java 2 SDKs installed in
|
---|
[4378f935] | 373 | <filename>/opt/jdk</filename>. You should decide on which one you
|
---|
[bccbdaea] | 374 | would like to use as the default. For example if you decide to use the
|
---|
[cb61e3a8] | 375 | source compiled <application>JDK</application>, do the following as the
|
---|
[ceafb03e] | 376 | <systemitem class="username">root</systemitem> user:</para>
|
---|
[014d11ad] | 377 |
|
---|
[8a64f4b] | 378 | <screen role="root"><userinput>ln -v -nsf jdk-&jdk-src-version; /opt/jdk/jdk</userinput></screen>
|
---|
[014d11ad] | 379 |
|
---|
[4378f935] | 380 | <para>Add the following <filename>jdk.sh</filename> shell startup file to
|
---|
[dae2ba0b] | 381 | the <filename>/etc/profile.d</filename> directory with the following
|
---|
[ceafb03e] | 382 | commands as the <systemitem class="username">root</systemitem> user:</para>
|
---|
[014d11ad] | 383 |
|
---|
[8a64f4b] | 384 | <screen role="root"><userinput>cat > /etc/profile.d/jdk.sh << "EOF"
|
---|
[4378f935] | 385 | <literal># Begin /etc/profile.d/jdk.sh
|
---|
[014d11ad] | 386 |
|
---|
[5f0bab7] | 387 | # Set JAVA_HOME directory
|
---|
| 388 | JAVA_HOME=/opt/jdk/jdk
|
---|
| 389 | export JAVA_HOME
|
---|
[014d11ad] | 390 |
|
---|
[92b34a8] | 391 | # Adjust PATH
|
---|
[5f0bab7] | 392 | pathappend ${JAVA_HOME}/bin PATH
|
---|
[014d11ad] | 393 |
|
---|
[5f0bab7] | 394 | # Auto Java Classpath Updating
|
---|
| 395 | # Create symlinks to this directory for auto classpath setting
|
---|
| 396 | AUTO_CLASSPATH_DIR=/usr/lib/classpath
|
---|
| 397 | if [ -z ${CLASSPATH} ]; then
|
---|
[256ee72c] | 398 | CLASSPATH=.:${AUTO_CLASSPATH_DIR}
|
---|
[5f0bab7] | 399 | else
|
---|
[256ee72c] | 400 | CLASSPATH="${CLASSPATH}:.:${AUTO_CLASSPATH_DIR}"
|
---|
[5f0bab7] | 401 | fi
|
---|
[014d11ad] | 402 |
|
---|
[92b34a8] | 403 | # Check for empty AUTO_CLASSPATH_DIR
|
---|
| 404 | ls ${AUTO_CLASSPATH_DIR}/*.jar &> /dev/null &&
|
---|
| 405 | for i in ${AUTO_CLASSPATH_DIR}/*.jar
|
---|
[256ee72c] | 406 | do CLASSPATH=${CLASSPATH}:"${i}"
|
---|
[5f0bab7] | 407 | done
|
---|
[92b34a8] | 408 | export CLASSPATH
|
---|
[014d11ad] | 409 |
|
---|
[4378f935] | 410 | # End /etc/profile.d/jdk.sh</literal>
|
---|
| 411 | EOF</userinput></screen>
|
---|
| 412 |
|
---|
[40d6bab] | 413 | <para>The <application>Java</application> plugin is located in
|
---|
[4378f935] | 414 | <filename class="directory">$JAVA_HOME/jre/plugin/i?86/ns7/</filename>.
|
---|
[40d6bab] | 415 | Make a symbolic link to the file in that directory from your browser(s)
|
---|
[4378f935] | 416 | plugins directory.</para>
|
---|
| 417 |
|
---|
[40d6bab] | 418 | <important>
|
---|
[4378f935] | 419 | <para>The plugin must be a symlink for it to work. If not, the browsers
|
---|
[40d6bab] | 420 | will crash when you attempt to load a <application>Java</application>
|
---|
[4378f935] | 421 | application.</para>
|
---|
[40d6bab] | 422 | </important>
|
---|
[4378f935] | 423 |
|
---|
| 424 | </sect3>
|
---|
| 425 |
|
---|
| 426 | </sect2>
|
---|
| 427 |
|
---|
| 428 | <sect2 role="content">
|
---|
| 429 | <title>Contents</title>
|
---|
| 430 |
|
---|
| 431 | <segmentedlist>
|
---|
| 432 | <segtitle>Installed Programs</segtitle>
|
---|
| 433 | <segtitle>Installed Libraries</segtitle>
|
---|
| 434 | <segtitle>Installed Directory</segtitle>
|
---|
| 435 |
|
---|
| 436 | <seglistitem>
|
---|
[bccbdaea] | 437 | <seg>appletviewer, extcheck, idlj, jar, jarsigner, java, javac,
|
---|
| 438 | javadoc,javah, javap, javaws, jdb, keytool, native2ascii, orbd,
|
---|
| 439 | policytool, rmic, rmid, rmiregistry, serialver, servertool, and
|
---|
[cb61e3a8] | 440 | tnameserv</seg>
|
---|
[bccbdaea] | 441 | <seg><envar>$JAVA_HOME</envar>/lib/*,
|
---|
[cb61e3a8] | 442 | <envar>$JAVA_HOME</envar>/jre/lib/*,
|
---|
[4378f935] | 443 | and libjavaplugin_oji.so</seg>
|
---|
| 444 | <seg>/opt/jdk</seg>
|
---|
| 445 | </seglistitem>
|
---|
| 446 | </segmentedlist>
|
---|
| 447 |
|
---|
| 448 | <variablelist>
|
---|
| 449 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 450 | <?dbfo list-presentation="list"?>
|
---|
| 451 | <?dbhtml list-presentation="table"?>
|
---|
| 452 |
|
---|
| 453 | <varlistentry id="appletviewer">
|
---|
| 454 | <term><command>appletviewer</command></term>
|
---|
| 455 | <listitem>
|
---|
[dae2ba0b] | 456 | <para>runs <application>Java</application> applets outside of the
|
---|
[4378f935] | 457 | context of a browser.</para>
|
---|
| 458 | <indexterm zone="jdk appletviewer">
|
---|
| 459 | <primary sortas="b-appletviewer">appletviewer</primary>
|
---|
| 460 | </indexterm>
|
---|
| 461 | </listitem>
|
---|
| 462 | </varlistentry>
|
---|
| 463 |
|
---|
| 464 | <varlistentry id="extcheck">
|
---|
| 465 | <term><command>extcheck</command></term>
|
---|
| 466 | <listitem>
|
---|
[dae2ba0b] | 467 | <para>checks a specified <filename>JAR</filename> file for title
|
---|
| 468 | and version conflicts with any extensions installed in the
|
---|
[4378f935] | 469 | <application>JDK</application> software.</para>
|
---|
| 470 | <indexterm zone="jdk extcheck">
|
---|
| 471 | <primary sortas="b-extcheck">extcheck</primary>
|
---|
| 472 | </indexterm>
|
---|
| 473 | </listitem>
|
---|
| 474 | </varlistentry>
|
---|
| 475 |
|
---|
| 476 | <varlistentry id="idlj">
|
---|
| 477 | <term><command>idlj</command></term>
|
---|
| 478 | <listitem>
|
---|
[dae2ba0b] | 479 | <para>generates <application>Java</application> bindings from a
|
---|
[4378f935] | 480 | given IDL file.</para>
|
---|
| 481 | <indexterm zone="jdk idlj">
|
---|
| 482 | <primary sortas="b-idlj">idlj</primary>
|
---|
| 483 | </indexterm>
|
---|
| 484 | </listitem>
|
---|
[0619e6d] | 485 | </varlistentry>
|
---|
[4378f935] | 486 |
|
---|
| 487 | <varlistentry id="jar">
|
---|
| 488 | <term><command>jar</command></term>
|
---|
| 489 | <listitem>
|
---|
[0619e6d] | 490 | <para>combines multiple files into a single <filename>JAR</filename>
|
---|
[4378f935] | 491 | archive file.</para>
|
---|
| 492 | <indexterm zone="jdk jar">
|
---|
| 493 | <primary sortas="b-jar">jar</primary>
|
---|
| 494 | </indexterm>
|
---|
| 495 | </listitem>
|
---|
| 496 | </varlistentry>
|
---|
| 497 |
|
---|
| 498 | <varlistentry id="jarsigner">
|
---|
| 499 | <term><command>jarsigner</command></term>
|
---|
| 500 | <listitem>
|
---|
[dae2ba0b] | 501 | <para>signs <filename>JAR</filename> (Java ARchive) files and verifies the
|
---|
[4378f935] | 502 | signatures and integrity of a signed <filename>JAR</filename>.</para>
|
---|
| 503 | <indexterm zone="jdk jarsigner">
|
---|
| 504 | <primary sortas="b-jarsigner">jarsigner</primary>
|
---|
| 505 | </indexterm>
|
---|
| 506 | </listitem>
|
---|
| 507 | </varlistentry>
|
---|
| 508 |
|
---|
| 509 | <varlistentry id="java">
|
---|
| 510 | <term><command>java</command></term>
|
---|
| 511 | <listitem>
|
---|
[dae2ba0b] | 512 | <para>launches a <application>Java</application> application by
|
---|
| 513 | starting a <application>Java</application> runtime environment, loading a
|
---|
[4378f935] | 514 | specified class and invoking its main method.</para>
|
---|
| 515 | <indexterm zone="jdk java">
|
---|
| 516 | <primary sortas="b-java">java</primary>
|
---|
| 517 | </indexterm>
|
---|
| 518 | </listitem>
|
---|
| 519 | </varlistentry>
|
---|
| 520 |
|
---|
| 521 | <varlistentry id="javac">
|
---|
| 522 | <term><command>javac</command></term>
|
---|
| 523 | <listitem>
|
---|
[dae2ba0b] | 524 | <para>reads class and interface definitions, written in the
|
---|
| 525 | <application>Java</application> programming language, and compiles
|
---|
[4378f935] | 526 | them into bytecode class files.</para>
|
---|
| 527 | <indexterm zone="jdk javac">
|
---|
| 528 | <primary sortas="b-javac">javac</primary>
|
---|
| 529 | </indexterm>
|
---|
| 530 | </listitem>
|
---|
| 531 | </varlistentry>
|
---|
| 532 |
|
---|
| 533 | <varlistentry id="javadoc">
|
---|
| 534 | <term><command>javadoc</command></term>
|
---|
| 535 | <listitem>
|
---|
[dae2ba0b] | 536 | <para>parses the declarations and documentation comments in a set of
|
---|
| 537 | <application>Java</application> source files and produces a corresponding
|
---|
| 538 | set of HTML pages describing the classes, interfaces,
|
---|
[4378f935] | 539 | constructors, methods, and fields.</para>
|
---|
| 540 | <indexterm zone="jdk javadoc">
|
---|
| 541 | <primary sortas="b-javadoc">javadoc</primary>
|
---|
| 542 | </indexterm>
|
---|
| 543 | </listitem>
|
---|
| 544 | </varlistentry>
|
---|
| 545 |
|
---|
| 546 | <varlistentry id="javah">
|
---|
| 547 | <term><command>javah</command></term>
|
---|
| 548 | <listitem>
|
---|
[dae2ba0b] | 549 | <para>generates <application>C</application> header and source files
|
---|
[4378f935] | 550 | that are needed to implement native methods.</para>
|
---|
| 551 | <indexterm zone="jdk javah">
|
---|
| 552 | <primary sortas="b-javah">javah</primary>
|
---|
| 553 | </indexterm>
|
---|
| 554 | </listitem>
|
---|
| 555 | </varlistentry>
|
---|
| 556 |
|
---|
| 557 | <varlistentry id="javap">
|
---|
| 558 | <term><command>javap</command></term>
|
---|
| 559 | <listitem>
|
---|
| 560 | <para>disassembles a <application>Java</application> class file.</para>
|
---|
| 561 | <indexterm zone="jdk javap">
|
---|
| 562 | <primary sortas="b-javap">javap</primary>
|
---|
| 563 | </indexterm>
|
---|
| 564 | </listitem>
|
---|
| 565 | </varlistentry>
|
---|
| 566 |
|
---|
| 567 | <varlistentry id="javaws">
|
---|
| 568 | <term><command>javaws</command></term>
|
---|
| 569 | <listitem>
|
---|
[dae2ba0b] | 570 | <para>launches <application>Java </application>application/applets
|
---|
[4378f935] | 571 | hosted on a network.</para>
|
---|
| 572 | <indexterm zone="jdk javaws">
|
---|
| 573 | <primary sortas="b-javaws">javaws</primary>
|
---|
| 574 | </indexterm>
|
---|
| 575 | </listitem>
|
---|
| 576 | </varlistentry>
|
---|
| 577 |
|
---|
| 578 | <varlistentry id="jdb">
|
---|
| 579 | <term><command>jdb</command></term>
|
---|
| 580 | <listitem>
|
---|
[dae2ba0b] | 581 | <para>is a simple command-line debugger for
|
---|
[4378f935] | 582 | <application>Java</application> classes.</para>
|
---|
| 583 | <indexterm zone="jdk jdb">
|
---|
| 584 | <primary sortas="b-jdb">jdb</primary>
|
---|
| 585 | </indexterm>
|
---|
| 586 | </listitem>
|
---|
| 587 | </varlistentry>
|
---|
| 588 |
|
---|
| 589 | <varlistentry id="keytool">
|
---|
| 590 | <term><command>keytool</command></term>
|
---|
| 591 | <listitem>
|
---|
| 592 | <para>is a key and certificate management utility.</para>
|
---|
| 593 | <indexterm zone="jdk keytool">
|
---|
| 594 | <primary sortas="b-keytool">keytool</primary>
|
---|
| 595 | </indexterm>
|
---|
| 596 | </listitem>
|
---|
| 597 | </varlistentry>
|
---|
| 598 |
|
---|
| 599 | <varlistentry id="native2ascii">
|
---|
| 600 | <term><command>native2ascii</command></term>
|
---|
| 601 | <listitem>
|
---|
[dae2ba0b] | 602 | <para> converts files that contain non-supported character encoding
|
---|
[4378f935] | 603 | into files containing Latin-1 or Unicode-encoded characters.</para>
|
---|
| 604 | <indexterm zone="jdk native2ascii">
|
---|
| 605 | <primary sortas="b-native2ascii">native2ascii</primary>
|
---|
| 606 | </indexterm>
|
---|
| 607 | </listitem>
|
---|
| 608 | </varlistentry>
|
---|
| 609 |
|
---|
| 610 | <varlistentry id="orbd">
|
---|
| 611 | <term><command>orbd</command></term>
|
---|
| 612 | <listitem>
|
---|
[dae2ba0b] | 613 | <para>is used to enable clients to transparently locate and invoke
|
---|
[4378f935] | 614 | persistent objects on servers in the CORBA environment.</para>
|
---|
| 615 | <indexterm zone="jdk orbd">
|
---|
| 616 | <primary sortas="b-orbd">orbd</primary>
|
---|
| 617 | </indexterm>
|
---|
| 618 | </listitem>
|
---|
| 619 | </varlistentry>
|
---|
| 620 |
|
---|
| 621 | <varlistentry id="policytool">
|
---|
| 622 | <term><command>policytool</command></term>
|
---|
| 623 | <listitem>
|
---|
| 624 | <para>creates and manages a policy file graphically.</para>
|
---|
| 625 | <indexterm zone="jdk policytool">
|
---|
| 626 | <primary sortas="b-policytool">policytool</primary>
|
---|
| 627 | </indexterm>
|
---|
| 628 | </listitem>
|
---|
| 629 | </varlistentry>
|
---|
| 630 |
|
---|
| 631 | <varlistentry id="rmic">
|
---|
| 632 | <term><command>rmic</command></term>
|
---|
| 633 | <listitem>
|
---|
[dae2ba0b] | 634 | <para>generates stub and skeleton class files for remote objects
|
---|
| 635 | from the names of compiled <application>Java</application> classes that
|
---|
[4378f935] | 636 | contain remote object implementations.</para>
|
---|
| 637 | <indexterm zone="jdk rmic">
|
---|
| 638 | <primary sortas="b-rmic">rmic</primary>
|
---|
| 639 | </indexterm>
|
---|
| 640 | </listitem>
|
---|
| 641 | </varlistentry>
|
---|
| 642 |
|
---|
| 643 | <varlistentry id="rmid">
|
---|
| 644 | <term><command>rmid</command></term>
|
---|
| 645 | <listitem>
|
---|
| 646 | <para>starts the activation system daemon.</para>
|
---|
| 647 | <indexterm zone="jdk rmid">
|
---|
| 648 | <primary sortas="b-rmid">rmid</primary>
|
---|
| 649 | </indexterm>
|
---|
| 650 | </listitem>
|
---|
| 651 | </varlistentry>
|
---|
| 652 |
|
---|
| 653 | <varlistentry id="rmiregistry">
|
---|
| 654 | <term><command>rmiregistry</command></term>
|
---|
| 655 | <listitem>
|
---|
[dae2ba0b] | 656 | <para>creates and starts a remote object registry on the specified
|
---|
[4378f935] | 657 | port on the current host.</para>
|
---|
| 658 | <indexterm zone="jdk rmiregistry">
|
---|
| 659 | <primary sortas="b-rmiregistry">rmiregistry</primary>
|
---|
| 660 | </indexterm>
|
---|
| 661 | </listitem>
|
---|
| 662 | </varlistentry>
|
---|
| 663 |
|
---|
| 664 | <varlistentry id="serialver">
|
---|
| 665 | <term><command>serialver</command></term>
|
---|
| 666 | <listitem>
|
---|
[dae2ba0b] | 667 | <para>returns the serialVersionUID for one or more classes in a
|
---|
[4378f935] | 668 | form suitable for copying into an evolving class.</para>
|
---|
| 669 | <indexterm zone="jdk serialver">
|
---|
| 670 | <primary sortas="b-serialver">serialver</primary>
|
---|
| 671 | </indexterm>
|
---|
| 672 | </listitem>
|
---|
| 673 | </varlistentry>
|
---|
| 674 |
|
---|
| 675 | <varlistentry id="servertool">
|
---|
| 676 | <term><command>servertool</command></term>
|
---|
| 677 | <listitem>
|
---|
[dae2ba0b] | 678 | <para>provides an ease-of-use interface for application programmers
|
---|
[4378f935] | 679 | to register, unregister, startup and shutdown a server.</para>
|
---|
| 680 | <indexterm zone="jdk servertool">
|
---|
| 681 | <primary sortas="b-servertool">servertool</primary>
|
---|
| 682 | </indexterm>
|
---|
| 683 | </listitem>
|
---|
| 684 | </varlistentry>
|
---|
| 685 |
|
---|
| 686 | <varlistentry id="tnameserv">
|
---|
| 687 | <term><command>tnameserv</command></term>
|
---|
| 688 | <listitem>
|
---|
| 689 | <para>starts the <application>Java</application> IDL name server.</para>
|
---|
| 690 | <indexterm zone="jdk tnameserv">
|
---|
| 691 | <primary sortas="b-tnameserv">tnameserv</primary>
|
---|
| 692 | </indexterm>
|
---|
| 693 | </listitem>
|
---|
| 694 | </varlistentry>
|
---|
| 695 |
|
---|
| 696 | </variablelist>
|
---|
| 697 |
|
---|
| 698 | </sect2>
|
---|
[74c1100] | 699 |
|
---|
| 700 | </sect1>
|
---|