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