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