[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>
|
---|
[985c02e] | 158 | <para role="required">X (<xref linkend="xfree86"/>, <xref linkend="xorg"/>,
|
---|
| 159 | or <xref linkend="xorg7"/>),
|
---|
[dae2ba0b] | 160 | <xref linkend="zip"/>,
|
---|
| 161 | <xref linkend="unzip"/>,
|
---|
| 162 | <xref linkend="cpio"/>,
|
---|
| 163 | <xref linkend="alsa"/>, and
|
---|
[4378f935] | 164 | <xref linkend="tcsh"/></para>
|
---|
| 165 |
|
---|
| 166 | </sect2>
|
---|
| 167 |
|
---|
| 168 | <sect2 role="installation">
|
---|
| 169 | <title>Installation of JDK</title>
|
---|
| 170 |
|
---|
[b26eca2] | 171 | <para>Both the binary and source built versions will be installed. You may
|
---|
| 172 | choose to keep either or both.</para>
|
---|
[4378f935] | 173 |
|
---|
[d4277d4] | 174 | <tip>
|
---|
| 175 | <para>The <command>./jdk-&jdk-bin-string;-linux-i?86.bin</command>
|
---|
| 176 | command below unpacks the distribution into a
|
---|
| 177 | <filename class='directory'>jdk&jdk-bin-version;</filename> directory.
|
---|
| 178 | You will be required to view, and then accept (by entering a
|
---|
| 179 | <keycap>y</keycap> keypress), a license agreement before any files are
|
---|
| 180 | unpacked. If you are scripting (automating) the build, you'll need to
|
---|
| 181 | account for this. There is information about automating build commands
|
---|
| 182 | in the <xref linkend="automating-builds"/> section of Chapter 2. Towards
|
---|
| 183 | the end of this section, specific information for automating this type of
|
---|
| 184 | installation is discussed.</para>
|
---|
| 185 | </tip>
|
---|
| 186 |
|
---|
[b26eca2] | 187 | <para>Normally in BLFS, the files are unpacked into a subdirectory
|
---|
[6473e74] | 188 | and the starting point for the installation procedures is that
|
---|
[b26eca2] | 189 | location. For this application only, start in the directory where all
|
---|
| 190 | the downloaded files are located.</para>
|
---|
| 191 |
|
---|
[4378f935] | 192 | <para>Install the precompiled <application>JDK</application> with the
|
---|
| 193 | following commands:</para>
|
---|
| 194 |
|
---|
[b26eca2] | 195 | <screen><userinput>cp jdk-&jdk-bin-string;-linux-i?86.bin jdk-mod.bin &&
|
---|
| 196 | sed -i "s:^PATH=.*::" jdk-mod.bin &&
|
---|
| 197 | chmod -v +x jdk-mod.bin &&
|
---|
| 198 | ./jdk-mod.bin</userinput></screen>
|
---|
[2a7340c2] | 199 |
|
---|
[4378f935] | 200 | <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
|
---|
[2a7340c2] | 201 |
|
---|
[b26eca2] | 202 | <screen role="root"><userinput>cd jdk&jdk-bin-version; &&
|
---|
| 203 | install -v -d /opt/jdk/jdk-precompiled-&jdk-bin-version; &&
|
---|
[cb61e3a8] | 204 | mv -v * /opt/jdk/jdk-precompiled-&jdk-bin-version; &&
|
---|
[f86db562] | 205 | chown -v -R root:root /opt/jdk/jdk-precompiled-&jdk-bin-version; &&
|
---|
[256f9439] | 206 | ln -v -sf motif21/libmawt.so \
|
---|
[b26eca2] | 207 | /opt/jdk/jdk-precompiled-&jdk-bin-version;/jre/lib/i386/ &&
|
---|
| 208 | cd ..</userinput></screen>
|
---|
[014d11ad] | 209 |
|
---|
[4378f935] | 210 | <para>The binary version is now installed.</para>
|
---|
[014d11ad] | 211 |
|
---|
[dae2ba0b] | 212 | <para>If you don't want to compile the source or are not in a position to
|
---|
| 213 | download the source owing to license restrictions, skip ahead to the
|
---|
[4378f935] | 214 | configuration section.</para>
|
---|
[014d11ad] | 215 |
|
---|
[bccbdaea] | 216 | <para>Save the existing path, and append the recently installed
|
---|
[cb61e3a8] | 217 | <application>JDK</application>.</para>
|
---|
[014d11ad] | 218 |
|
---|
[cb61e3a8] | 219 | <screen><userinput>export JAVA_HOME=/opt/jdk/jdk-precompiled-&jdk-bin-version; &&
|
---|
| 220 | export PATH_HOLD=${PATH} &&
|
---|
| 221 | export PATH=${PATH}:${JAVA_HOME}/bin</userinput></screen>
|
---|
[014d11ad] | 222 |
|
---|
[b89c7ca] | 223 | <para>The source code is contained in a self-extracting
|
---|
[bccbdaea] | 224 | <filename class='extension'>jar</filename> file. You
|
---|
| 225 | will need to be in a windowed environment to extract the sources.
|
---|
[cb61e3a8] | 226 | Create a directory to store the extracted sources. Choose the newly
|
---|
| 227 | created <filename class="directory">jdk-build</filename> directory
|
---|
| 228 | when prompted for the target directory.</para>
|
---|
[014d11ad] | 229 |
|
---|
[4378f935] | 230 | <screen><userinput>mkdir jdk-build &&
|
---|
[5f0bab7] | 231 | cd jdk-build &&
|
---|
[cb61e3a8] | 232 | for JAR in ../jdk-&jdk-src-string;*.jar
|
---|
| 233 | do java -jar ${JAR}
|
---|
| 234 | done</userinput></screen>
|
---|
[014d11ad] | 235 |
|
---|
[b89c7ca] | 236 | <para>Apply all the patches downloaded above:</para>
|
---|
[014d11ad] | 237 |
|
---|
[4378f935] | 238 | <screen><userinput>for PATCH in ../jdk-&jdk-src-version;*.patch
|
---|
[5f0bab7] | 239 | do patch -Np1 -i ${PATCH}
|
---|
[4378f935] | 240 | done</userinput></screen>
|
---|
[014d11ad] | 241 |
|
---|
[985c02e] | 242 | <para>If your X Window System is installed in any prefix other than
|
---|
| 243 | <filename class="directory">/usr/X11R6</filename>, adjust as necessary and
|
---|
| 244 | execute the following command:</para>
|
---|
| 245 |
|
---|
| 246 | <screen><userinput>find . -type f -exec sed -i 's@/usr/X11R6@<replaceable>[/usr]</replaceable>@g' {} \;</userinput></screen>
|
---|
| 247 |
|
---|
[4378f935] | 248 | <para>Set/unset some variables which affect the build:</para>
|
---|
[2a7340c2] | 249 |
|
---|
[4378f935] | 250 | <screen><userinput>export ALT_BOOTDIR="$JAVA_HOME" &&
|
---|
[52d29f7] | 251 | unset JAVA_HOME &&
|
---|
| 252 | unset CLASSPATH
|
---|
| 253 | unset CFLAGS
|
---|
| 254 | unset CXXFLAGS
|
---|
| 255 | unset LDFLAGS
|
---|
| 256 | export ALT_DEVTOOLS_PATH="/usr/bin" &&
|
---|
[99a7cb0] | 257 | export BUILD_NUMBER="update-05" &&
|
---|
[52d29f7] | 258 | export DEV_ONLY=true &&
|
---|
[cb61e3a8] | 259 | export ALT_MOZILLA_HEADERS_PATH=$PWD/share/plugin/ &&
|
---|
[52d29f7] | 260 | export INSANE=true &&
|
---|
| 261 | export MAKE_VERBOSE=true &&
|
---|
[4378f935] | 262 | export ALT_CACERTS_FILE=${ALT_BOOTDIR}/jre/lib/security/cacerts</userinput></screen>
|
---|
[014d11ad] | 263 |
|
---|
[4378f935] | 264 | <warning>
|
---|
[dae2ba0b] | 265 | <para>Setting CFLAGS/CXXFLAGS/LDFLAGS is guaranteed to make the build
|
---|
[bccbdaea] | 266 | fail. If you are interested in optimizing the build, set
|
---|
| 267 | OTHER_CFLAGS/OTHER_CXXFLAGS/OTHER_LDFLAGS instead. -O3, even in
|
---|
[0b584261] | 268 | OTHER_C{,XX}FLAGS, is known to cause a build failure.</para>
|
---|
[4378f935] | 269 | </warning>
|
---|
[014d11ad] | 270 |
|
---|
[40d6bab] | 271 | <para>Additionally, if you would like to <command>make</command> in
|
---|
| 272 | parallel, add the following:</para>
|
---|
[2a7340c2] | 273 |
|
---|
[4378f935] | 274 | <screen><userinput>export HOTSPOT_BUILD_JOBS=<replaceable>[3]</replaceable></userinput></screen>
|
---|
[014d11ad] | 275 |
|
---|
[4378f935] | 276 | <para>Build the <application>JDK</application> with the following
|
---|
| 277 | commands. There will be a lot of messages about missing files that look like
|
---|
[bdf7e1b] | 278 | errors. These are caused by not meeting the expected build environment
|
---|
[dae2ba0b] | 279 | (Red Hat). As long as the build doesn't stop, the messages
|
---|
[4378f935] | 280 | are harmless.</para>
|
---|
[014d11ad] | 281 |
|
---|
[4378f935] | 282 | <screen><userinput>cd control/make &&
|
---|
[52d29f7] | 283 | make &&
|
---|
[4378f935] | 284 | cd ../build/linux-i?86</userinput></screen>
|
---|
[2a7340c2] | 285 |
|
---|
[dae2ba0b] | 286 | <para>Now, as the <systemitem class="username">root</systemitem> user,
|
---|
[4378f935] | 287 | install the <application>JDK</application>:</para>
|
---|
[2a7340c2] | 288 |
|
---|
[4378f935] | 289 | <screen role="root"><userinput>cp -v -a j2sdk-image /opt/jdk/jdk-&jdk-src-version; &&
|
---|
[61e058b] | 290 | chown -v -R root:root /opt/jdk/jdk-&jdk-src-version; &&
|
---|
[6dd0164] | 291 | ln -sf motif21/libmawt.so /opt/jdk/jdk-&jdk-src-version;/jre/lib/i386/</userinput></screen>
|
---|
[2a7340c2] | 292 |
|
---|
[40d6bab] | 293 | <para>Restore the unprivileged user's environment using the following
|
---|
| 294 | commands:</para>
|
---|
[2a7340c2] | 295 |
|
---|
[cb61e3a8] | 296 | <screen><userinput>unset ALT_BOOTDIR &&
|
---|
[2a7340c2] | 297 | unset ALT_DEVTOOLS_PATH &&
|
---|
| 298 | unset BUILD_NUMBER &&
|
---|
| 299 | unset DEV_ONLY &&
|
---|
[cb61e3a8] | 300 | unset ALT_MOZILLA_HEADERS_PATH &&
|
---|
[2a7340c2] | 301 | unset INSANE &&
|
---|
| 302 | unset MAKE_VERBOSE &&
|
---|
[cb61e3a8] | 303 | unset ALT_CACERTS_FILE &&
|
---|
| 304 | export PATH=${PATH_HOLD} &&
|
---|
| 305 | unset PATH_HOLD</userinput></screen>
|
---|
[014d11ad] | 306 |
|
---|
[4378f935] | 307 | </sect2>
|
---|
[52d29f7] | 308 |
|
---|
[4378f935] | 309 | <sect2 role="commands">
|
---|
| 310 | <title>Command Explanations</title>
|
---|
[014d11ad] | 311 |
|
---|
[40d6bab] | 312 | <para><command>export ALT_BOOTDIR="$JAVA_HOME"</command>: This variable sets
|
---|
[4378f935] | 313 | the location of the bootstrap <application>JDK</application>.</para>
|
---|
[014d11ad] | 314 |
|
---|
[cb61e3a8] | 315 | <para><command>export ALT_MOZILLA_HEADERS_PATH=$PWD/share/plugin/</command>:
|
---|
| 316 | This tells the build exactly where to find the
|
---|
[bccbdaea] | 317 | <application>Mozilla</application> headers. This has changed since the
|
---|
| 318 | previous version and is not mentioned in the installation documentation
|
---|
[cb61e3a8] | 319 | included with the package source.</para>
|
---|
[014d11ad] | 320 |
|
---|
[4378f935] | 321 | <para><command>export ALT_DEVTOOLS_PATH="/usr/bin"</command>: This
|
---|
| 322 | changes the location where the build finds the needed executables.</para>
|
---|
[014d11ad] | 323 |
|
---|
[dae2ba0b] | 324 | <para><command>export BUILD_NUMBER="blfs-&blfs-version;"</command>:
|
---|
| 325 | This will help you identify the compiled version of the runtime environment
|
---|
| 326 | and virtual machine by appending this information to the version
|
---|
[4378f935] | 327 | string.</para>
|
---|
[014d11ad] | 328 |
|
---|
[4378f935] | 329 | <para><command>export DEV_ONLY=true</command>: This command
|
---|
| 330 | skips compiling the documentation and eliminates a dependency on
|
---|
| 331 | <application>rpm</application>.</para>
|
---|
[014d11ad] | 332 |
|
---|
[4378f935] | 333 | <para><command>unset JAVA_HOME</command>: This clears the
|
---|
[dae2ba0b] | 334 | <envar>JAVA_HOME</envar> variable as recommended by the build
|
---|
[4378f935] | 335 | instructions.</para>
|
---|
[014d11ad] | 336 |
|
---|
[4378f935] | 337 | <para><command>unset CLASSPATH</command>: This clears the
|
---|
[40d6bab] | 338 | <envar>CLASSPATH</envar> variable as recommended by the build
|
---|
[4378f935] | 339 | instructions.</para>
|
---|
[014d11ad] | 340 |
|
---|
[dae2ba0b] | 341 | <para><command>unset CFLAGS/CXXFLAGS...</command>: These variables cause
|
---|
[4378f935] | 342 | miscompilation of the build. Never set them.</para>
|
---|
[014d11ad] | 343 |
|
---|
[dae2ba0b] | 344 | <para><command>export INSANE=true</command>: The certified platform for the
|
---|
| 345 | build is Redhat Enterprise Advanced Server 2.1. This variable ensures that
|
---|
| 346 | all the errors related to compiling on a non-certified platform will be
|
---|
[4378f935] | 347 | displayed as warnings instead of errors.</para>
|
---|
[014d11ad] | 348 |
|
---|
[dae2ba0b] | 349 | <para><command>export MAKE_VERBOSE=true</command>: Allows the compiler
|
---|
[4378f935] | 350 | commands to be displayed on the console.</para>
|
---|
[014d11ad] | 351 |
|
---|
[4378f935] | 352 | <para><command>export ALT_CACERTS_FILE...</command>: Specifies the
|
---|
[dae2ba0b] | 353 | certificate file to use (from the installed binary
|
---|
[4378f935] | 354 | <application>JDK</application>).</para>
|
---|
[014d11ad] | 355 |
|
---|
[bccbdaea] | 356 | <para><command>ln -sf motif21/libmawt.so
|
---|
| 357 | /opt/jdk/jdk-&jdk-src-version;/jre/lib/i386/</command>: This fixes
|
---|
| 358 | linking issues with other applications that expect to find the
|
---|
| 359 | <application>motif</application> libraries with the other
|
---|
[6dd0164] | 360 | <application>JDK</application> libraries.</para>
|
---|
[61e058b] | 361 |
|
---|
[4378f935] | 362 | </sect2>
|
---|
[52d29f7] | 363 |
|
---|
[4378f935] | 364 | <sect2 role="configuration">
|
---|
| 365 | <title>Configuring JDK</title>
|
---|
[014d11ad] | 366 |
|
---|
[4378f935] | 367 | <sect3>
|
---|
| 368 | <title>Configuration Information</title>
|
---|
[014d11ad] | 369 |
|
---|
[bdf7e1b] | 370 | <para>There are now two Java 2 SDKs installed in
|
---|
[4378f935] | 371 | <filename>/opt/jdk</filename>. You should decide on which one you
|
---|
[bccbdaea] | 372 | would like to use as the default. For example if you decide to use the
|
---|
[cb61e3a8] | 373 | source compiled <application>JDK</application>, do the following as the
|
---|
[ceafb03e] | 374 | <systemitem class="username">root</systemitem> user:</para>
|
---|
[014d11ad] | 375 |
|
---|
[8a64f4b] | 376 | <screen role="root"><userinput>ln -v -nsf jdk-&jdk-src-version; /opt/jdk/jdk</userinput></screen>
|
---|
[014d11ad] | 377 |
|
---|
[4378f935] | 378 | <para>Add the following <filename>jdk.sh</filename> shell startup file to
|
---|
[dae2ba0b] | 379 | the <filename>/etc/profile.d</filename> directory with the following
|
---|
[ceafb03e] | 380 | commands as the <systemitem class="username">root</systemitem> user:</para>
|
---|
[014d11ad] | 381 |
|
---|
[8a64f4b] | 382 | <screen role="root"><userinput>cat > /etc/profile.d/jdk.sh << "EOF"
|
---|
[4378f935] | 383 | <literal># Begin /etc/profile.d/jdk.sh
|
---|
[014d11ad] | 384 |
|
---|
[5f0bab7] | 385 | # Set JAVA_HOME directory
|
---|
| 386 | JAVA_HOME=/opt/jdk/jdk
|
---|
| 387 | export JAVA_HOME
|
---|
[014d11ad] | 388 |
|
---|
[92b34a8] | 389 | # Adjust PATH
|
---|
[5f0bab7] | 390 | pathappend ${JAVA_HOME}/bin PATH
|
---|
[014d11ad] | 391 |
|
---|
[5f0bab7] | 392 | # Auto Java Classpath Updating
|
---|
| 393 | # Create symlinks to this directory for auto classpath setting
|
---|
| 394 | AUTO_CLASSPATH_DIR=/usr/lib/classpath
|
---|
| 395 | if [ -z ${CLASSPATH} ]; then
|
---|
[256ee72c] | 396 | CLASSPATH=.:${AUTO_CLASSPATH_DIR}
|
---|
[5f0bab7] | 397 | else
|
---|
[256ee72c] | 398 | CLASSPATH="${CLASSPATH}:.:${AUTO_CLASSPATH_DIR}"
|
---|
[5f0bab7] | 399 | fi
|
---|
[014d11ad] | 400 |
|
---|
[92b34a8] | 401 | # Check for empty AUTO_CLASSPATH_DIR
|
---|
| 402 | ls ${AUTO_CLASSPATH_DIR}/*.jar &> /dev/null &&
|
---|
| 403 | for i in ${AUTO_CLASSPATH_DIR}/*.jar
|
---|
[256ee72c] | 404 | do CLASSPATH=${CLASSPATH}:"${i}"
|
---|
[5f0bab7] | 405 | done
|
---|
[92b34a8] | 406 | export CLASSPATH
|
---|
[014d11ad] | 407 |
|
---|
[4378f935] | 408 | # End /etc/profile.d/jdk.sh</literal>
|
---|
| 409 | EOF</userinput></screen>
|
---|
| 410 |
|
---|
[40d6bab] | 411 | <para>The <application>Java</application> plugin is located in
|
---|
[4378f935] | 412 | <filename class="directory">$JAVA_HOME/jre/plugin/i?86/ns7/</filename>.
|
---|
[40d6bab] | 413 | Make a symbolic link to the file in that directory from your browser(s)
|
---|
[4378f935] | 414 | plugins directory.</para>
|
---|
| 415 |
|
---|
[40d6bab] | 416 | <important>
|
---|
[4378f935] | 417 | <para>The plugin must be a symlink for it to work. If not, the browsers
|
---|
[40d6bab] | 418 | will crash when you attempt to load a <application>Java</application>
|
---|
[4378f935] | 419 | application.</para>
|
---|
[40d6bab] | 420 | </important>
|
---|
[4378f935] | 421 |
|
---|
| 422 | </sect3>
|
---|
| 423 |
|
---|
| 424 | </sect2>
|
---|
| 425 |
|
---|
| 426 | <sect2 role="content">
|
---|
| 427 | <title>Contents</title>
|
---|
| 428 |
|
---|
| 429 | <segmentedlist>
|
---|
| 430 | <segtitle>Installed Programs</segtitle>
|
---|
| 431 | <segtitle>Installed Libraries</segtitle>
|
---|
| 432 | <segtitle>Installed Directory</segtitle>
|
---|
| 433 |
|
---|
| 434 | <seglistitem>
|
---|
[bccbdaea] | 435 | <seg>appletviewer, extcheck, idlj, jar, jarsigner, java, javac,
|
---|
| 436 | javadoc,javah, javap, javaws, jdb, keytool, native2ascii, orbd,
|
---|
| 437 | policytool, rmic, rmid, rmiregistry, serialver, servertool, and
|
---|
[cb61e3a8] | 438 | tnameserv</seg>
|
---|
[bccbdaea] | 439 | <seg><envar>$JAVA_HOME</envar>/lib/*,
|
---|
[cb61e3a8] | 440 | <envar>$JAVA_HOME</envar>/jre/lib/*,
|
---|
[4378f935] | 441 | and libjavaplugin_oji.so</seg>
|
---|
| 442 | <seg>/opt/jdk</seg>
|
---|
| 443 | </seglistitem>
|
---|
| 444 | </segmentedlist>
|
---|
| 445 |
|
---|
| 446 | <variablelist>
|
---|
| 447 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 448 | <?dbfo list-presentation="list"?>
|
---|
| 449 | <?dbhtml list-presentation="table"?>
|
---|
| 450 |
|
---|
| 451 | <varlistentry id="appletviewer">
|
---|
| 452 | <term><command>appletviewer</command></term>
|
---|
| 453 | <listitem>
|
---|
[dae2ba0b] | 454 | <para>runs <application>Java</application> applets outside of the
|
---|
[4378f935] | 455 | context of a browser.</para>
|
---|
| 456 | <indexterm zone="jdk appletviewer">
|
---|
| 457 | <primary sortas="b-appletviewer">appletviewer</primary>
|
---|
| 458 | </indexterm>
|
---|
| 459 | </listitem>
|
---|
| 460 | </varlistentry>
|
---|
| 461 |
|
---|
| 462 | <varlistentry id="extcheck">
|
---|
| 463 | <term><command>extcheck</command></term>
|
---|
| 464 | <listitem>
|
---|
[dae2ba0b] | 465 | <para>checks a specified <filename>JAR</filename> file for title
|
---|
| 466 | and version conflicts with any extensions installed in the
|
---|
[4378f935] | 467 | <application>JDK</application> software.</para>
|
---|
| 468 | <indexterm zone="jdk extcheck">
|
---|
| 469 | <primary sortas="b-extcheck">extcheck</primary>
|
---|
| 470 | </indexterm>
|
---|
| 471 | </listitem>
|
---|
| 472 | </varlistentry>
|
---|
| 473 |
|
---|
| 474 | <varlistentry id="idlj">
|
---|
| 475 | <term><command>idlj</command></term>
|
---|
| 476 | <listitem>
|
---|
[dae2ba0b] | 477 | <para>generates <application>Java</application> bindings from a
|
---|
[4378f935] | 478 | given IDL file.</para>
|
---|
| 479 | <indexterm zone="jdk idlj">
|
---|
| 480 | <primary sortas="b-idlj">idlj</primary>
|
---|
| 481 | </indexterm>
|
---|
| 482 | </listitem>
|
---|
[0619e6d] | 483 | </varlistentry>
|
---|
[4378f935] | 484 |
|
---|
| 485 | <varlistentry id="jar">
|
---|
| 486 | <term><command>jar</command></term>
|
---|
| 487 | <listitem>
|
---|
[0619e6d] | 488 | <para>combines multiple files into a single <filename>JAR</filename>
|
---|
[4378f935] | 489 | archive file.</para>
|
---|
| 490 | <indexterm zone="jdk jar">
|
---|
| 491 | <primary sortas="b-jar">jar</primary>
|
---|
| 492 | </indexterm>
|
---|
| 493 | </listitem>
|
---|
| 494 | </varlistentry>
|
---|
| 495 |
|
---|
| 496 | <varlistentry id="jarsigner">
|
---|
| 497 | <term><command>jarsigner</command></term>
|
---|
| 498 | <listitem>
|
---|
[dae2ba0b] | 499 | <para>signs <filename>JAR</filename> (Java ARchive) files and verifies the
|
---|
[4378f935] | 500 | signatures and integrity of a signed <filename>JAR</filename>.</para>
|
---|
| 501 | <indexterm zone="jdk jarsigner">
|
---|
| 502 | <primary sortas="b-jarsigner">jarsigner</primary>
|
---|
| 503 | </indexterm>
|
---|
| 504 | </listitem>
|
---|
| 505 | </varlistentry>
|
---|
| 506 |
|
---|
| 507 | <varlistentry id="java">
|
---|
| 508 | <term><command>java</command></term>
|
---|
| 509 | <listitem>
|
---|
[dae2ba0b] | 510 | <para>launches a <application>Java</application> application by
|
---|
| 511 | starting a <application>Java</application> runtime environment, loading a
|
---|
[4378f935] | 512 | specified class and invoking its main method.</para>
|
---|
| 513 | <indexterm zone="jdk java">
|
---|
| 514 | <primary sortas="b-java">java</primary>
|
---|
| 515 | </indexterm>
|
---|
| 516 | </listitem>
|
---|
| 517 | </varlistentry>
|
---|
| 518 |
|
---|
| 519 | <varlistentry id="javac">
|
---|
| 520 | <term><command>javac</command></term>
|
---|
| 521 | <listitem>
|
---|
[dae2ba0b] | 522 | <para>reads class and interface definitions, written in the
|
---|
| 523 | <application>Java</application> programming language, and compiles
|
---|
[4378f935] | 524 | them into bytecode class files.</para>
|
---|
| 525 | <indexterm zone="jdk javac">
|
---|
| 526 | <primary sortas="b-javac">javac</primary>
|
---|
| 527 | </indexterm>
|
---|
| 528 | </listitem>
|
---|
| 529 | </varlistentry>
|
---|
| 530 |
|
---|
| 531 | <varlistentry id="javadoc">
|
---|
| 532 | <term><command>javadoc</command></term>
|
---|
| 533 | <listitem>
|
---|
[dae2ba0b] | 534 | <para>parses the declarations and documentation comments in a set of
|
---|
| 535 | <application>Java</application> source files and produces a corresponding
|
---|
| 536 | set of HTML pages describing the classes, interfaces,
|
---|
[4378f935] | 537 | constructors, methods, and fields.</para>
|
---|
| 538 | <indexterm zone="jdk javadoc">
|
---|
| 539 | <primary sortas="b-javadoc">javadoc</primary>
|
---|
| 540 | </indexterm>
|
---|
| 541 | </listitem>
|
---|
| 542 | </varlistentry>
|
---|
| 543 |
|
---|
| 544 | <varlistentry id="javah">
|
---|
| 545 | <term><command>javah</command></term>
|
---|
| 546 | <listitem>
|
---|
[dae2ba0b] | 547 | <para>generates <application>C</application> header and source files
|
---|
[4378f935] | 548 | that are needed to implement native methods.</para>
|
---|
| 549 | <indexterm zone="jdk javah">
|
---|
| 550 | <primary sortas="b-javah">javah</primary>
|
---|
| 551 | </indexterm>
|
---|
| 552 | </listitem>
|
---|
| 553 | </varlistentry>
|
---|
| 554 |
|
---|
| 555 | <varlistentry id="javap">
|
---|
| 556 | <term><command>javap</command></term>
|
---|
| 557 | <listitem>
|
---|
| 558 | <para>disassembles a <application>Java</application> class file.</para>
|
---|
| 559 | <indexterm zone="jdk javap">
|
---|
| 560 | <primary sortas="b-javap">javap</primary>
|
---|
| 561 | </indexterm>
|
---|
| 562 | </listitem>
|
---|
| 563 | </varlistentry>
|
---|
| 564 |
|
---|
| 565 | <varlistentry id="javaws">
|
---|
| 566 | <term><command>javaws</command></term>
|
---|
| 567 | <listitem>
|
---|
[dae2ba0b] | 568 | <para>launches <application>Java </application>application/applets
|
---|
[4378f935] | 569 | hosted on a network.</para>
|
---|
| 570 | <indexterm zone="jdk javaws">
|
---|
| 571 | <primary sortas="b-javaws">javaws</primary>
|
---|
| 572 | </indexterm>
|
---|
| 573 | </listitem>
|
---|
| 574 | </varlistentry>
|
---|
| 575 |
|
---|
| 576 | <varlistentry id="jdb">
|
---|
| 577 | <term><command>jdb</command></term>
|
---|
| 578 | <listitem>
|
---|
[dae2ba0b] | 579 | <para>is a simple command-line debugger for
|
---|
[4378f935] | 580 | <application>Java</application> classes.</para>
|
---|
| 581 | <indexterm zone="jdk jdb">
|
---|
| 582 | <primary sortas="b-jdb">jdb</primary>
|
---|
| 583 | </indexterm>
|
---|
| 584 | </listitem>
|
---|
| 585 | </varlistentry>
|
---|
| 586 |
|
---|
| 587 | <varlistentry id="keytool">
|
---|
| 588 | <term><command>keytool</command></term>
|
---|
| 589 | <listitem>
|
---|
| 590 | <para>is a key and certificate management utility.</para>
|
---|
| 591 | <indexterm zone="jdk keytool">
|
---|
| 592 | <primary sortas="b-keytool">keytool</primary>
|
---|
| 593 | </indexterm>
|
---|
| 594 | </listitem>
|
---|
| 595 | </varlistentry>
|
---|
| 596 |
|
---|
| 597 | <varlistentry id="native2ascii">
|
---|
| 598 | <term><command>native2ascii</command></term>
|
---|
| 599 | <listitem>
|
---|
[dae2ba0b] | 600 | <para> converts files that contain non-supported character encoding
|
---|
[4378f935] | 601 | into files containing Latin-1 or Unicode-encoded characters.</para>
|
---|
| 602 | <indexterm zone="jdk native2ascii">
|
---|
| 603 | <primary sortas="b-native2ascii">native2ascii</primary>
|
---|
| 604 | </indexterm>
|
---|
| 605 | </listitem>
|
---|
| 606 | </varlistentry>
|
---|
| 607 |
|
---|
| 608 | <varlistentry id="orbd">
|
---|
| 609 | <term><command>orbd</command></term>
|
---|
| 610 | <listitem>
|
---|
[dae2ba0b] | 611 | <para>is used to enable clients to transparently locate and invoke
|
---|
[4378f935] | 612 | persistent objects on servers in the CORBA environment.</para>
|
---|
| 613 | <indexterm zone="jdk orbd">
|
---|
| 614 | <primary sortas="b-orbd">orbd</primary>
|
---|
| 615 | </indexterm>
|
---|
| 616 | </listitem>
|
---|
| 617 | </varlistentry>
|
---|
| 618 |
|
---|
| 619 | <varlistentry id="policytool">
|
---|
| 620 | <term><command>policytool</command></term>
|
---|
| 621 | <listitem>
|
---|
| 622 | <para>creates and manages a policy file graphically.</para>
|
---|
| 623 | <indexterm zone="jdk policytool">
|
---|
| 624 | <primary sortas="b-policytool">policytool</primary>
|
---|
| 625 | </indexterm>
|
---|
| 626 | </listitem>
|
---|
| 627 | </varlistentry>
|
---|
| 628 |
|
---|
| 629 | <varlistentry id="rmic">
|
---|
| 630 | <term><command>rmic</command></term>
|
---|
| 631 | <listitem>
|
---|
[dae2ba0b] | 632 | <para>generates stub and skeleton class files for remote objects
|
---|
| 633 | from the names of compiled <application>Java</application> classes that
|
---|
[4378f935] | 634 | contain remote object implementations.</para>
|
---|
| 635 | <indexterm zone="jdk rmic">
|
---|
| 636 | <primary sortas="b-rmic">rmic</primary>
|
---|
| 637 | </indexterm>
|
---|
| 638 | </listitem>
|
---|
| 639 | </varlistentry>
|
---|
| 640 |
|
---|
| 641 | <varlistentry id="rmid">
|
---|
| 642 | <term><command>rmid</command></term>
|
---|
| 643 | <listitem>
|
---|
| 644 | <para>starts the activation system daemon.</para>
|
---|
| 645 | <indexterm zone="jdk rmid">
|
---|
| 646 | <primary sortas="b-rmid">rmid</primary>
|
---|
| 647 | </indexterm>
|
---|
| 648 | </listitem>
|
---|
| 649 | </varlistentry>
|
---|
| 650 |
|
---|
| 651 | <varlistentry id="rmiregistry">
|
---|
| 652 | <term><command>rmiregistry</command></term>
|
---|
| 653 | <listitem>
|
---|
[dae2ba0b] | 654 | <para>creates and starts a remote object registry on the specified
|
---|
[4378f935] | 655 | port on the current host.</para>
|
---|
| 656 | <indexterm zone="jdk rmiregistry">
|
---|
| 657 | <primary sortas="b-rmiregistry">rmiregistry</primary>
|
---|
| 658 | </indexterm>
|
---|
| 659 | </listitem>
|
---|
| 660 | </varlistentry>
|
---|
| 661 |
|
---|
| 662 | <varlistentry id="serialver">
|
---|
| 663 | <term><command>serialver</command></term>
|
---|
| 664 | <listitem>
|
---|
[dae2ba0b] | 665 | <para>returns the serialVersionUID for one or more classes in a
|
---|
[4378f935] | 666 | form suitable for copying into an evolving class.</para>
|
---|
| 667 | <indexterm zone="jdk serialver">
|
---|
| 668 | <primary sortas="b-serialver">serialver</primary>
|
---|
| 669 | </indexterm>
|
---|
| 670 | </listitem>
|
---|
| 671 | </varlistentry>
|
---|
| 672 |
|
---|
| 673 | <varlistentry id="servertool">
|
---|
| 674 | <term><command>servertool</command></term>
|
---|
| 675 | <listitem>
|
---|
[dae2ba0b] | 676 | <para>provides an ease-of-use interface for application programmers
|
---|
[4378f935] | 677 | to register, unregister, startup and shutdown a server.</para>
|
---|
| 678 | <indexterm zone="jdk servertool">
|
---|
| 679 | <primary sortas="b-servertool">servertool</primary>
|
---|
| 680 | </indexterm>
|
---|
| 681 | </listitem>
|
---|
| 682 | </varlistentry>
|
---|
| 683 |
|
---|
| 684 | <varlistentry id="tnameserv">
|
---|
| 685 | <term><command>tnameserv</command></term>
|
---|
| 686 | <listitem>
|
---|
| 687 | <para>starts the <application>Java</application> IDL name server.</para>
|
---|
| 688 | <indexterm zone="jdk tnameserv">
|
---|
| 689 | <primary sortas="b-tnameserv">tnameserv</primary>
|
---|
| 690 | </indexterm>
|
---|
| 691 | </listitem>
|
---|
| 692 | </varlistentry>
|
---|
| 693 |
|
---|
| 694 | </variablelist>
|
---|
| 695 |
|
---|
| 696 | </sect2>
|
---|
[74c1100] | 697 |
|
---|
| 698 | </sect1>
|
---|