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