source: general/prog/jdk.xml@ fd7e0ed6

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 6.3 6.3-rc1 6.3-rc2 6.3-rc3 7.10 7.4 7.5 7.6 7.6-blfs 7.6-systemd 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind gnome kde5-13430 kde5-14269 kde5-14686 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts krejzi/svn lazarus lxqt nosym perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition systemd-11177 systemd-13485 trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since fd7e0ed6 was fd7e0ed6, checked in by Randy McMurchy <randy@…>, 16 years ago

Changed all lines with nothing but whitespace to blank lines

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@7429 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 36.8 KB
RevLine 
[52d29f7]1<?xml version="1.0" encoding="ISO-8859-1"?>
[6732c094]2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
[52d29f7]4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
[a8d33f07]7 <!ENTITY jdk-download-binary "http://java.sun.com/javase/downloads/index.jsp">
[9f15455]8 <!ENTITY jdk-bin-md5sum "f7528500c17c09546566e05988beda86">
9 <!ENTITY jdk-bin-size "67 MB">
10 <!ENTITY jdk-bin-buildsize "207 MB">
11 <!ENTITY jdk-bin-version "6u5">
[a8d33f07]12
[be9eae3]13 <!ENTITY jdk-source-jrl-md5sum "83390379fb9f3193e93a9d5eed5b31d9">
14 <!ENTITY jdk-source-bin-md5sum "8b6f1b8d8dec051c18385539111141ec">
15 <!ENTITY jdk-source-moz-md5sum "6dcaf7af16211617adff5d672a8b79f4">
[a8d33f07]16
[be9eae3]17 <!ENTITY jdk-source-jrl-size "111 MB">
[a8d33f07]18 <!ENTITY jdk-source-bin-size "2 MB">
19 <!ENTITY jdk-source-moz-size "8.2 MB">
20
[be9eae3]21 <!ENTITY jdk-src-buildsize "1.5 GB">
22 <!ENTITY jdk-time "12.5 SBU (for both installations)">
23 <!ENTITY jdk-version-string "6u3">
[9f15455]24 <!ENTITY jdk-bin-version-string "1.6.0_05">
25
26 <!ENTITY jdk-download-source-jrl "http://www.java.net/download/jdk6/&jdk-version-string;/promoted/b05/jdk-&jdk-version-string;-fcs-src-b05-jrl-24_sep_2007.jar">
27 <!ENTITY jdk-download-source-bin "http://www.java.net/download/jdk6/&jdk-version-string;/promoted/b05/jdk-&jdk-version-string;-fcs-bin-b05-jrl-24_sep_2007.jar">
28 <!ENTITY jdk-download-source-moz "http://www.java.net/download/jdk6/&jdk-version-string;/promoted/b05/jdk-&jdk-version-string;-fcs-mozilla_headers-b05-unix-24_sep_2007.jar">
29
[52d29f7]30]>
31
[a240109f]32<sect1 id="jdk" xreflabel="JDK-&jdk-version;">
[4378f935]33 <?dbhtml filename="jdk.html" ?>
34
35 <sect1info>
36 <othername>$LastChangedBy$</othername>
37 <date>$Date$</date>
38 </sect1info>
39
[a8d33f07]40 <title>JDK-&jdk-version;</title>
[4378f935]41
42 <indexterm zone="jdk">
43 <primary sortas="a-JDK">JDK</primary>
44 </indexterm>
45
46 <sect2 role="package">
47 <title>Introduction to JDK</title>
48
[dae2ba0b]49 <para>The <application>JDK</application> package contains
[bccbdaea]50 Sun's <application>Java</application> development environment. This is
51 useful for developing <application>Java</application> programs and provides
52 the runtime environment necessary to run <application>Java</application>
[cb61e3a8]53 programs. It also includes a plug-in for browsers so that they can be
[4378f935]54 <application>Java</application> aware.</para>
55
[1402f13]56 <!-- Previously, the plugin included
[cb61e3a8]57 in the <application>JDK</application> binary package was unusable on LFS
[bccbdaea]58 owing to incompatibilities with <application>GCC</application>-3 compiled
[9f15455]59 browsers. This is not the case anymore.</para> -->
[4378f935]60
[1402f13]61 <para>The <application>JDK</application> comes in two flavors, a
62 precompiled binary and a source package. You will first need to download
63 and install the binary version of the <application>JDK</application>
64 (you'll need to click and agree to the <quote>Sun Microsystems, Inc.
[9f15455]65 Binary Code License Agreement</quote>). To build from the source, you
66 will need to read, and agree to the Sun
[72f4fda]67 <ulink url="&patch-root;/jdk-Readme.txt">Java Research License</ulink>.
[9f15455]68 You will also need to download the additional files and patches to
69 complete the source build as detailed below. Note that in some countries
70 you cannot download the source code.</para>
71
72 <warning><para>Sun has recently decided not to provide JRL sources for
73 the latest update versions of the JDK. The source build instructions and
74 patches are here for reference only, and contain known security
75 vulnerabilities. For more information, please see Sun Alerts
76 <ulink url="http://sunsolve.sun.com/search/document.do?assetkey=1-66-231246-1">231246</ulink>,
77 <ulink url="http://sunsolve.sun.com/search/document.do?assetkey=1-66-233321-1">233321</ulink>,
78 <ulink url="http://sunsolve.sun.com/search/document.do?assetkey=1-66-233322-1">233322</ulink>,
79 <ulink url="http://sunsolve.sun.com/search/document.do?assetkey=1-66-233323-1">233323</ulink>,
80 <ulink url="http://sunsolve.sun.com/search/document.do?assetkey=1-66-233324-1">233324</ulink>,
81 <ulink url="http://sunsolve.sun.com/search/document.do?assetkey=1-66-233325-1">233325</ulink>,
82 <ulink url="http://sunsolve.sun.com/search/document.do?assetkey=1-66-233326-1">233326</ulink>, and
83 <ulink url="http://sunsolve.sun.com/search/document.do?assetkey=1-66-233327-1">233327</ulink>.</para>
84 <para> Sun is actively working on a GPL'd version of the JDK, titled
85 <ulink url="http://openjdk.java.net/projects/jdk6/">OpenJDK</ulink>.
86 This new JDK will be licensed under the
87 <ulink url="http://openjdk.java.net/legal/gplv2+ce.html">GNU General
88 Public License, version 2, with the Classpath Exception</ulink>.
89 A stable OpenJDK was not available at the time of writing.</para></warning>
90
[1402f13]91
[a8d33f07]92 <bridgehead renderas="sect3">Binary Package Information</bridgehead>
[4378f935]93 <itemizedlist spacing="compact">
94 <listitem>
[9f15455]95 <para>Binary download (jdk-&jdk-bin-version;-linux-i586.bin):
[1402f13]96 <ulink url="&jdk-download-binary;"/></para>
97 </listitem>
98 <listitem>
99 <para>Download MD5 sum: &jdk-bin-md5sum;</para>
[4378f935]100 </listitem>
101 <listitem>
[1402f13]102 <para>Download size (binary): &jdk-bin-size;</para>
[4378f935]103 </listitem>
104 <listitem>
[1402f13]105 <para>Estimated disk space required: &jdk-bin-buildsize;</para>
[4378f935]106 </listitem>
[1402f13]107 </itemizedlist>
[428434e7]108
[1402f13]109 <bridgehead renderas="sect3">Source Package Information</bridgehead>
[bc4c3018]110
[1402f13]111 <itemizedlist spacing="compact">
[4378f935]112 <listitem>
[bc4c3018]113 <para>JRL Source
[b26eca2]114 <simplelist>
[bc4c3018]115 <member><ulink url="&jdk-download-source-jrl;"/></member>
116 <member>&jdk-source-jrl-md5sum;</member>
117 <member>&jdk-source-jrl-size;</member>
118 </simplelist>
119 </para>
120 </listitem>
[4378f935]121 <listitem>
[bc4c3018]122 <para>Source Binaries
123 <simplelist>
124 <member><ulink url="&jdk-download-source-bin;"/></member>
125 <member>&jdk-source-bin-md5sum;</member>
126 <member>&jdk-source-bin-size;</member>
127 </simplelist>
128 </para>
129 </listitem>
130 <listitem>
131 <para>Mozilla Headers
132 <simplelist>
133 <member><ulink url="&jdk-download-source-moz;"/></member>
134 <member>&jdk-source-moz-md5sum;</member>
135 <member>&jdk-source-moz-size;</member>
136 </simplelist>
137 </para>
[4378f935]138 </listitem>
139 <listitem>
140 <para>Estimated disk space required: &jdk-src-buildsize;</para>
141 </listitem>
142 <listitem>
143 <para>Estimated build time: &jdk-time;</para>
144 </listitem>
145 </itemizedlist>
146
147 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
148
149 <bridgehead renderas="sect4">Required Patches</bridgehead>
150 <itemizedlist spacing='compact'>
151 <listitem>
152 <para><ulink
[e13349f]153 url="&patch-root;/jdk-&jdk-version-string;-gcc4-1.patch"/></para>
[4378f935]154 </listitem>
155 <listitem>
[dae2ba0b]156 <para><ulink
[a8d33f07]157 url="&patch-root;/jdk-&jdk-version-string;-motif_fixes-1.patch"/></para>
[4378f935]158 </listitem>
159 <listitem>
160 <para><ulink
[a8d33f07]161 url="&patch-root;/jdk-&jdk-version-string;-remove_fixed_paths-1.patch"/></para>
[4378f935]162 </listitem>
163 </itemizedlist>
164
[42a04581]165 <bridgehead renderas="sect3">JDK Dependencies</bridgehead>
[4378f935]166
[d4b83073]167 <bridgehead renderas="sect4">Optional Runtime Dependencies (for binary
[9f15455]168 installation)</bridgehead>
169 <para role="optional">
[a8d33f07]170 <xref linkend="alsa-lib"/>,
[9f15455]171 <xref linkend="cups"/>, and
172 <xref linkend="gtk2"/></para>
173
174 <bridgehead renderas="sect4">Additional Requirements
175 (for source build, including optional requirements)</bridgehead>
176 <para role="required">
[dae2ba0b]177 <xref linkend="cpio"/>,
[a8d33f07]178 <xref linkend="ksh"/>,
179 <xref linkend="unzip"/>,
[9f15455]180 <xref linkend="which"/>, and
[a8d33f07]181 <xref linkend="zip"/></para>
[4378f935]182
[1039de3]183 <para condition="html" role="usernotes">User Notes:
184 <ulink url="&blfs-wiki;/jdk"/></para>
185
[4378f935]186 </sect2>
187
188 <sect2 role="installation">
189 <title>Installation of JDK</title>
190
[1402f13]191 <para>The instructions below install both the binary and source versions.
192 You may stop after installing the binary version or continue on installing
193 the source version. You can choose to keep either or both.</para>
[4378f935]194
[d4277d4]195 <tip>
[9f15455]196 <para>The <command>./jdk-&jdk-bin-version;-linux-i586.bin</command>
[d4277d4]197 command below unpacks the distribution into a
[a8d33f07]198 <filename class='directory'>jdk&jdk-bin-version-string;</filename>
199 directory. You will be required to view, and then accept (by entering a
[d4277d4]200 <keycap>y</keycap> keypress), a license agreement before any files are
201 unpacked. If you are scripting (automating) the build, you'll need to
202 account for this. There is information about automating build commands
203 in the <xref linkend="automating-builds"/> section of Chapter 2. Towards
204 the end of this section, specific information for automating this type of
205 installation is discussed.</para>
206 </tip>
207
[b26eca2]208 <para>Normally in BLFS, the files are unpacked into a subdirectory
[6473e74]209 and the starting point for the installation procedures is that
[b26eca2]210 location. For this application only, start in the directory where all
211 the downloaded files are located.</para>
212
[a8d33f07]213 <para>Install the binary <application>JDK</application> with the
[4378f935]214 following commands:</para>
215
[9f15455]216<screen><userinput>chmod 755 jdk-&jdk-bin-version;-linux-i586.bin &amp;&amp;
217./jdk-&jdk-bin-version;-linux-i586.bin</userinput></screen>
[2a7340c2]218
[e04be6a2]219 <note><para>The installation will end with a message
220 "./jdk-&jdk-bin-version;-linux-i586.bin: line 43: 20283 Aborted" as
221 javaprefix is unset in the environment. This is by design as
222 <application>GTK+</application> may not be installed during the
223 installation, however, the installation will still exit with a zero error
224 value if scripting the build.</para></note>
225
[4378f935]226 <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
[2a7340c2]227
[a8d33f07]228<screen role="root"><userinput>cd jdk&jdk-bin-version-string; &amp;&amp;
[9f15455]229install -v -m755 -d /opt/jdk-bin-&jdk-bin-version; &amp;&amp;
230mv -v * /opt/jdk-bin-&jdk-bin-version; &amp;&amp;
231chown -v -R root:root /opt/jdk-bin-&jdk-bin-version; &amp;&amp;
[a8d33f07]232ln -v -sf xawt/libmawt.so \
[9f15455]233 /opt/jdk-bin-&jdk-bin-version;/jre/lib/i386/ &amp;&amp;
[b26eca2]234cd ..</userinput></screen>
[014d11ad]235
[e04be6a2]236 <para>Recent versions of libX11 break libmawt
[a8d33f07]237 when used with the Xinerama extension. While still the
238 <systemitem class="username">root</systemitem> user, apply the
[be9eae3]239 following sed to the installed binary to work around this
[a8d33f07]240 problem:</para>
241
242<screen role="root"><userinput>sed -i 's@XINERAMA@FAKEEXTN@g' \
[9f15455]243 /opt/jdk-bin-&jdk-bin-version;/jre/lib/i386/xawt/libmawt.so</userinput></screen>
244
[4378f935]245 <para>The binary version is now installed.</para>
[014d11ad]246
[dae2ba0b]247 <para>If you don't want to compile the source or are not in a position to
248 download the source owing to license restrictions, skip ahead to the
[4378f935]249 configuration section.</para>
[014d11ad]250
[bccbdaea]251 <para>Save the existing path, and append the recently installed
[cb61e3a8]252 <application>JDK</application>.</para>
[014d11ad]253
[a8d33f07]254<screen><userinput>export JAVA_HOME=/opt/jdk-bin-&jdk-version-string; &amp;&amp;
[cb61e3a8]255export PATH_HOLD=${PATH} &amp;&amp;
256export PATH=${PATH}:${JAVA_HOME}/bin</userinput></screen>
[014d11ad]257
[aeaebda9]258 <para>The source code is contained in self-extracting
259 <filename class='extension'>jar</filename> files. You
[bccbdaea]260 will need to be in a windowed environment to extract the sources.
[cb61e3a8]261 Create a directory to store the extracted sources. Choose the newly
262 created <filename class="directory">jdk-build</filename> directory
263 when prompted for the target directory.</para>
[014d11ad]264
[4378f935]265<screen><userinput>mkdir jdk-build &amp;&amp;
[5f0bab7]266cd jdk-build &amp;&amp;
[a8d33f07]267for JAR in ../jdk-&jdk-version-string;*.jar
[cb61e3a8]268 do java -jar ${JAR}
269done</userinput></screen>
[014d11ad]270
[b89c7ca]271 <para>Apply all the patches downloaded above:</para>
[014d11ad]272
[a8d33f07]273<screen><userinput>for PATCH in ../jdk-&jdk-version-string;*.patch
[5f0bab7]274 do patch -Np1 -i ${PATCH}
[4378f935]275done</userinput></screen>
[014d11ad]276
[a8d33f07]277 <para>Use the following commands to apply some minor changes that
278 are a little more specific to BLFS, such as lack of a gcc-2.9
279 compiler, removing a broken demo, and forcing to link to shared
280 libraries. See the 'Command Explanations' section for more detail:</para>
281
282<screen><userinput>sed -i '/^.*linux)/ { N; /.*/ { N; /.*/d }}' \
283 deploy/make/plugin/{adapter,nscore}/Makefile &amp;&amp;
284sed -i '/.*mtrace.*/ { N; /.*/ s/.*mtrace.*\n.*/\t mtrace/ }' \
285 j2se/make/mkdemo/jvmti/Makefile &amp;&amp;
286sed -i 's/= true/= false/' \
287 j2se/make/common/shared/Compiler-gcc.gmk</userinput></screen>
288
[71cd2a5a]289 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
290 href="../../xincludes/X11R6_symlink.xml"/>
291
292 <!-- <para>If your <application>X Window System</application> is installed into
[864b24de]293 any prefix other than <filename class="directory">/usr/X11R6</filename>,
[a8d33f07]294 execute the following commands, replacing
[864b24de]295 <replaceable>&lt;PREFIX&gt;</replaceable> with the installation prefix of
[dc19fbff]296 the <application>X Window System</application>:</para>
[985c02e]297
[a8d33f07]298<screen><userinput>for file in `find . -name Makefile \
299 -or -name Imakefile -or -name *.gmk`
300do sed -i 's@/usr/X11R6@<replaceable>&lt;PREFIX&gt;</replaceable>@g' $file
301done &amp;&amp;
302sed -i 's@/usr/X11R6@<replaceable>&lt;PREFIX&gt;</replaceable>@g' \
303 j2se/src/solaris/native/sun/awt/fontpath.c \
304 j2se/src/solaris/classes/sun/awt/motif/linux.fontconfig.Sun.properties \
305 j2se/src/solaris/classes/sun/awt/motif/linux.fontconfig.RedHat.3.properties</userinput></screen> -->
[985c02e]306
[4378f935]307 <para>Set/unset some variables which affect the build:</para>
[2a7340c2]308
[bc2b746]309<screen><userinput>export ALT_BOOTDIR=${JAVA_HOME} &amp;&amp;
310export CLASSPATH_HOLD=${CLASSPATH} &amp;&amp;
[a8d33f07]311export ALT_CACERTS_FILE=${ALT_BOOTDIR}/jre/lib/security/cacerts &amp;&amp;
312export ALT_MOZILLA_HEADERS_PATH=${PWD}/share/plugin &amp;&amp;
[be9eae3]313export MILESTONE="03-BLFS" &amp;&amp;
[a8d33f07]314export BUILD_NUMBER="b05" &amp;&amp;
[52d29f7]315export INSANE=true &amp;&amp;
[a8d33f07]316export DEV_ONLY=true &amp;&amp;
317export SKIP_FASTDEBUG_BUILD=true &amp;&amp;
318unset JAVA_HOME CLASSPATH CFLAGS CXXFLAGS LDFLAGS</userinput></screen>
[014d11ad]319
[a8d33f07]320 <warning><para>Setting CFLAGS/CXXFLAGS/LDFLAGS is guaranteed to make
321 the build fail. If you are interested in optimizing the build, set
[bccbdaea]322 OTHER_CFLAGS/OTHER_CXXFLAGS/OTHER_LDFLAGS instead. -O3, even in
[a8d33f07]323 OTHER_C{,XX}FLAGS, is known to cause a build failure.</para></warning>
[fd7e0ed6]324
[014d11ad]325
[40d6bab]326 <para>Additionally, if you would like to <command>make</command> in
327 parallel, add the following:</para>
[2a7340c2]328
[1039de3]329<screen><userinput>export HOTSPOT_BUILD_JOBS=<replaceable>&lt;3&gt;</replaceable></userinput></screen>
[014d11ad]330
[4378f935]331 <para>Build the <application>JDK</application> with the following
[1402f13]332 commands. There will be a few messages about missing files that look like
[bdf7e1b]333 errors. These are caused by not meeting the expected build environment
[dae2ba0b]334 (Red Hat). As long as the build doesn't stop, the messages
[4378f935]335 are harmless.</para>
[014d11ad]336
[1402f13]337<screen><userinput>pushd control/make &amp;&amp;
[52d29f7]338make &amp;&amp;
[1402f13]339popd</userinput></screen>
[2a7340c2]340
[aeaebda9]341 <para>To test the results, you can run one of the provided demo programs
342 using the newly created <command>java</command> binary. Issue the
343 following commands:</para>
344
[a8d33f07]345<screen><userinput>pushd control/build/linux-i586/j2sdk-image/demo/jfc/Java2D &amp;&amp;
[aeaebda9]346../../../bin/java -jar Java2Demo.jar &amp;&amp;
[1402f13]347popd</userinput></screen>
[aeaebda9]348
[dae2ba0b]349 <para>Now, as the <systemitem class="username">root</systemitem> user,
[4378f935]350 install the <application>JDK</application>:</para>
[2a7340c2]351
[a8d33f07]352<screen role="root"><userinput>pushd control/build/linux-i586 &amp;&amp;
353cp -v -a j2sdk-image /opt/jdk-&jdk-version-string; &amp;&amp;
354chown -v -R root:root /opt/jdk-&jdk-version-string; &amp;&amp;
355ln -v -sf xawt/libmawt.so /opt/jdk-&jdk-version-string;/jre/lib/i386/ &amp;&amp;
[1402f13]356popd</userinput></screen>
[2a7340c2]357
[40d6bab]358 <para>Restore the unprivileged user's environment using the following
359 commands:</para>
[2a7340c2]360
[bc2b746]361<screen><userinput>export JAVA_HOME=${ALT_BOOTDIR} &amp;&amp;
362export CLASSPATH=${CLASSPATH_HOLD} &amp;&amp;
[cb61e3a8]363export PATH=${PATH_HOLD} &amp;&amp;
[a8d33f07]364unset PATH_HOLD ALT_BOOTDIR CLASSPATH_HOLD \
365 ALT_CACERTS_FILE ALT_MOZILLA_HEADERS_PATH \
366 BUILD_NUMBER MILESTONE INSANE DEV_ONLY \
367 SKIP_FASTDEBUG_BUILD</userinput></screen>
[014d11ad]368
[4378f935]369 </sect2>
[52d29f7]370
[4378f935]371 <sect2 role="commands">
372 <title>Command Explanations</title>
[014d11ad]373
[a8d33f07]374 <para><command>sed -i '/^.*linux)/...</command>: This command disables
375 the build of a gcc-2.9 compatible browser plugin. LFS does not contain
376 gcc-2.9, and hasn't in quite a few years.</para>
377
378 <para><command>sed -i '/.*mtrace.*/...</command>: This command disables
379 building of the broken 'waiters' demo.</para>
380
381 <para><command>sed -i 's/= true/= false/'...</command>: This command
382 forces the compiler to link against the standard C libraries
383 dynamically.</para>
384
[bc2b746]385 <para><command>export ALT_BOOTDIR=${JAVA_HOME}</command>: This variable sets
[4378f935]386 the location of the bootstrap <application>JDK</application>.</para>
[014d11ad]387
[a8d33f07]388 <para><command>export ALT_CACERTS_FILE...</command>: Specifies the
389 certificate file to use (from the installed binary
390 <application>JDK</application>).</para>
391
[bc2b746]392 <para><command>export ALT_MOZILLA_HEADERS_PATH=${PWD}/share/plugin/</command>:
[cb61e3a8]393 This tells the build exactly where to find the
[bccbdaea]394 <application>Mozilla</application> headers. This has changed since the
395 previous version and is not mentioned in the installation documentation
[cb61e3a8]396 included with the package source.</para>
[014d11ad]397
[be9eae3]398 <para><command>export MILESTONE="03-BLFS"</command>: This appends
399 the string '03-BLFS' to the buld number. 'internal' is
[a8d33f07]400 unconditionally added if MILESTONE is unset. This is similar
401 to the format used by Sun for the official release.</para>
[014d11ad]402
[a8d33f07]403 <para><command>export BUILD_NUMBER="b05"</command>:
404 This will help you identify the compiled version of the runtime
405 environment and virtual machine by appending this information to
406 the version string. This is the same build number used by Sun to
407 identify the official release.</para>
[014d11ad]408
[dae2ba0b]409 <para><command>export INSANE=true</command>: The certified platform for the
410 build is Redhat Enterprise Advanced Server 2.1. This variable ensures that
411 all the errors related to compiling on a non-certified platform will be
[4378f935]412 displayed as warnings instead of errors.</para>
[014d11ad]413
[a8d33f07]414 <para><command>export DEV_ONLY=true</command>: This command
415 skips compiling the comparison build.</para>
[014d11ad]416
[a8d33f07]417 <para><command>export SKIP_FASTDEBUG_BUILD=true</command>: This command
418 skips building of the debug version. Omit this command if you need
419 to build the fastdebug target.</para>
[014d11ad]420
[a8d33f07]421 <para><command>unset JAVA_HOME CLASSPATH CFLAGS CXXFLAGS LDFLAGS</command>:
422 These variables cause miscompilation of the build. Never set them.</para>
423
424 <para><command>ln -sf xawt/libmawt.so
425 /opt/jdk-&jdk-version-string;/jre/lib/i386/</command>: This fixes
[bccbdaea]426 linking issues with other applications that expect to find the
427 <application>motif</application> libraries with the other
[6dd0164]428 <application>JDK</application> libraries.</para>
[61e058b]429
[4378f935]430 </sect2>
[52d29f7]431
[4378f935]432 <sect2 role="configuration">
433 <title>Configuring JDK</title>
[014d11ad]434
[4378f935]435 <sect3>
436 <title>Configuration Information</title>
[014d11ad]437
[bdf7e1b]438 <para>There are now two Java 2 SDKs installed in
[a8d33f07]439 <filename>/opt</filename>. You should decide on which one you
[bccbdaea]440 would like to use as the default. For example if you decide to use the
[e04be6a2]441 precompiled <application>JDK</application>, do the following as the
[ceafb03e]442 <systemitem class="username">root</systemitem> user:</para>
[014d11ad]443
[e04be6a2]444<screen role="root"><userinput>ln -v -nsf jdk-bin-&jdk-bin-version; /opt/jdk</userinput></screen>
[014d11ad]445
[1d359cd]446 <para>The information below assumes your system is set up using the
447 instructions found in
448 <quote><xref linkend="postlfs-config-profile"/></quote>. You may need to
449 extract the relevant information below and incorporate it into your
450 system's startup files if your system is set up differently.</para>
451
[4378f935]452 <para>Add the following <filename>jdk.sh</filename> shell startup file to
[dae2ba0b]453 the <filename>/etc/profile.d</filename> directory with the following
[ceafb03e]454 commands as the <systemitem class="username">root</systemitem> user:</para>
[014d11ad]455
[8a64f4b]456<screen role="root"><userinput>cat &gt; /etc/profile.d/jdk.sh &lt;&lt; "EOF"
[4378f935]457<literal># Begin /etc/profile.d/jdk.sh
[014d11ad]458
[5f0bab7]459# Set JAVA_HOME directory
[a8d33f07]460JAVA_HOME=/opt/jdk
[014d11ad]461
[92b34a8]462# Adjust PATH
[5f0bab7]463pathappend ${JAVA_HOME}/bin PATH
[014d11ad]464
[de27951]465# Auto Java CLASSPATH
466# Copy jar files to, or create symlinks in this directory
[5f0bab7]467AUTO_CLASSPATH_DIR=/usr/lib/classpath
[93a1fa3]468pathprepend . CLASSPATH
469for dir in `find ${AUTO_CLASSPATH_DIR} -type d 2>/dev/null`; do
470 pathappend $dir CLASSPATH
[5f0bab7]471done
[de27951]472
[93a1fa3]473export JAVA_HOME CLASSPATH
474unset AUTO_CLASSPATH_DIR
475unset dir
[014d11ad]476
[4378f935]477# End /etc/profile.d/jdk.sh</literal>
478EOF</userinput></screen>
479
[40d6bab]480 <para>The <application>Java</application> plugin is located in
[4378f935]481 <filename class="directory">$JAVA_HOME/jre/plugin/i?86/ns7/</filename>.
[40d6bab]482 Make a symbolic link to the file in that directory from your browser(s)
[4378f935]483 plugins directory.</para>
484
[40d6bab]485 <important>
[4378f935]486 <para>The plugin must be a symlink for it to work. If not, the browsers
[40d6bab]487 will crash when you attempt to load a <application>Java</application>
[4378f935]488 application.</para>
[40d6bab]489 </important>
[4378f935]490
491 </sect3>
492
493 </sect2>
494
495 <sect2 role="content">
496 <title>Contents</title>
497
498 <segmentedlist>
499 <segtitle>Installed Programs</segtitle>
500 <segtitle>Installed Libraries</segtitle>
501 <segtitle>Installed Directory</segtitle>
502
503 <seglistitem>
[a8d33f07]504 <seg>appletviewer, apt, extcheck, idlj, HtmlConverter, jar,
505 jarsigner, java, javac, javadoc, javah, javap, java-rmi.cgi,
506 javaws, jconsole, jdb, jhat, jinfo, jmap, jps,
507 jrunscript, jsadebugd, jstack, jstat, jstatd, keytool,
508 native2ascii, orbd, pack200, policytool, rmic, rmid, rmiregistry,
509 schemagen, serialver, servertool, tnameserv, unpack200,
510 wsgen, wsimport, and xjc</seg>
[bccbdaea]511 <seg><envar>$JAVA_HOME</envar>/lib/*,
[cb61e3a8]512 <envar>$JAVA_HOME</envar>/jre/lib/*,
[4378f935]513 and libjavaplugin_oji.so</seg>
[a8d33f07]514 <seg>/opt/jdk-&jdk-version-string;</seg>
[4378f935]515 </seglistitem>
516 </segmentedlist>
517
518 <variablelist>
519 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
520 <?dbfo list-presentation="list"?>
521 <?dbhtml list-presentation="table"?>
522
523 <varlistentry id="appletviewer">
524 <term><command>appletviewer</command></term>
525 <listitem>
[a8d33f07]526 <para>runs Java applets outside of the context of a browser.</para>
[4378f935]527 <indexterm zone="jdk appletviewer">
528 <primary sortas="b-appletviewer">appletviewer</primary>
529 </indexterm>
530 </listitem>
531 </varlistentry>
532
[a8d33f07]533 <varlistentry id="apt">
534 <term><command>apt</command></term>
535 <listitem>
536 <para>is an annotation processing tool.</para>
537 <indexterm zone="jdk apt">
538 <primary sortas="b-apt">apt</primary>
539 </indexterm>
540 </listitem>
541 </varlistentry>
542
[4378f935]543 <varlistentry id="extcheck">
544 <term><command>extcheck</command></term>
545 <listitem>
[a8d33f07]546 <para>checks a specified jar file for title and version conflicts
547 with any extensions installed in the <application>JDK</application>
548 software.</para>
[4378f935]549 <indexterm zone="jdk extcheck">
550 <primary sortas="b-extcheck">extcheck</primary>
551 </indexterm>
552 </listitem>
553 </varlistentry>
554
[a8d33f07]555 <varlistentry id="HtmlConverter">
556 <term><command>HtmlConverter</command></term>
557 <listitem>
558 <para>adds Java auto download to html and asp pages. </para>
559 <indexterm zone="jdk HtmlConverter">
560 <primary sortas="b-HtmlConverter">HtmlConverter</primary>
561 </indexterm>
562 </listitem>
563 </varlistentry>
564
[4378f935]565 <varlistentry id="idlj">
566 <term><command>idlj</command></term>
567 <listitem>
[a8d33f07]568 <para>generates Java bindings from a given IDL file.</para>
[4378f935]569 <indexterm zone="jdk idlj">
570 <primary sortas="b-idlj">idlj</primary>
571 </indexterm>
572 </listitem>
[0619e6d]573 </varlistentry>
[4378f935]574
575 <varlistentry id="jar">
576 <term><command>jar</command></term>
577 <listitem>
[a8d33f07]578 <para>combines multiple files into a single jar archive.</para>
[4378f935]579 <indexterm zone="jdk jar">
580 <primary sortas="b-jar">jar</primary>
581 </indexterm>
582 </listitem>
583 </varlistentry>
584
585 <varlistentry id="jarsigner">
586 <term><command>jarsigner</command></term>
587 <listitem>
[a8d33f07]588 <para>signs jar files and verifies the signatures and integrity
589 of a signed jar file.</para>
[4378f935]590 <indexterm zone="jdk jarsigner">
591 <primary sortas="b-jarsigner">jarsigner</primary>
592 </indexterm>
593 </listitem>
594 </varlistentry>
595
596 <varlistentry id="java">
597 <term><command>java</command></term>
598 <listitem>
[a8d33f07]599 <para>launches a Java application by starting a Java runtime
600 environment, loading a specified class and invoking its main
601 method.</para>
[4378f935]602 <indexterm zone="jdk java">
603 <primary sortas="b-java">java</primary>
604 </indexterm>
605 </listitem>
606 </varlistentry>
607
608 <varlistentry id="javac">
609 <term><command>javac</command></term>
610 <listitem>
[dae2ba0b]611 <para>reads class and interface definitions, written in the
[a8d33f07]612 Java programming language, and compiles them into bytecode
613 class files.</para>
[4378f935]614 <indexterm zone="jdk javac">
615 <primary sortas="b-javac">javac</primary>
616 </indexterm>
617 </listitem>
618 </varlistentry>
619
620 <varlistentry id="javadoc">
621 <term><command>javadoc</command></term>
622 <listitem>
[a8d33f07]623 <para>parses the declarations and documentation comments in a
624 set of Java source files and produces a corresponding set of
625 HTML pages describing the classes, interfaces,constructors,
626 methods, and fields.</para>
[4378f935]627 <indexterm zone="jdk javadoc">
628 <primary sortas="b-javadoc">javadoc</primary>
629 </indexterm>
630 </listitem>
631 </varlistentry>
632
633 <varlistentry id="javah">
634 <term><command>javah</command></term>
635 <listitem>
[a8d33f07]636 <para>generates C header and source files
[4378f935]637 that are needed to implement native methods.</para>
638 <indexterm zone="jdk javah">
639 <primary sortas="b-javah">javah</primary>
640 </indexterm>
641 </listitem>
642 </varlistentry>
643
644 <varlistentry id="javap">
645 <term><command>javap</command></term>
646 <listitem>
[a8d33f07]647 <para>disassembles a Java class file.</para>
[4378f935]648 <indexterm zone="jdk javap">
649 <primary sortas="b-javap">javap</primary>
650 </indexterm>
651 </listitem>
652 </varlistentry>
653
[a8d33f07]654 <varlistentry id="java-rmi.cgi">
655 <term><command>java-rmi.cgi</command></term>
656 <listitem>
657 <para>is the Java RMI client.</para>
658 <indexterm zone="jdk java-rmi.cgi">
659 <primary sortas="b-java-rmi.cgi">java-rmi.cgi</primary>
660 </indexterm>
661 </listitem>
662 </varlistentry>
663
[4378f935]664 <varlistentry id="javaws">
665 <term><command>javaws</command></term>
666 <listitem>
[a8d33f07]667 <para>launches Java application/applets hosted on a network.</para>
[4378f935]668 <indexterm zone="jdk javaws">
669 <primary sortas="b-javaws">javaws</primary>
670 </indexterm>
671 </listitem>
672 </varlistentry>
673
[a8d33f07]674 <varlistentry id="jconsole">
675 <term><command>jconsole</command></term>
676 <listitem>
677 <para>is a graphical console tool to monitor and manage both
678 local and remote Java applications and virtual machines.</para>
679 <indexterm zone="jdk jconsole">
680 <primary sortas="b-jconsole">jconsole</primary>
681 </indexterm>
682 </listitem>
683 </varlistentry>
684
[4378f935]685 <varlistentry id="jdb">
686 <term><command>jdb</command></term>
687 <listitem>
[a8d33f07]688 <para>is a simple command-line debugger for Java classes.</para>
[4378f935]689 <indexterm zone="jdk jdb">
690 <primary sortas="b-jdb">jdb</primary>
691 </indexterm>
692 </listitem>
693 </varlistentry>
694
[a8d33f07]695 <varlistentry id="jhat">
696 <term><command>jhat</command></term>
697 <listitem>
698 <para>parses a java heap dump file and allows viewing
699 in a webbrowser.</para>
700 <indexterm zone="jdk jhat">
701 <primary sortas="b-jhat">jhat</primary>
702 </indexterm>
703 </listitem>
704 </varlistentry>
705
706 <varlistentry id="jinfo">
707 <term><command>jinfo</command></term>
708 <listitem>
709 <para>prints Java configuration information for a given Java
710 process, core file, or a remote debug server.</para>
711 <indexterm zone="jdk jinfo">
712 <primary sortas="b-jinfo">jinfo</primary>
713 </indexterm>
714 </listitem>
715 </varlistentry>
716
717 <varlistentry id="jmap">
718 <term><command>jmap</command></term>
719 <listitem>
720 <para>prints shared object memory maps or heap memory details
721 of a given process, core file, or a remote debug server.</para>
722 <indexterm zone="jdk jmap">
723 <primary sortas="b-jmap">jmap</primary>
724 </indexterm>
725 </listitem>
726 </varlistentry>
727
728 <varlistentry id="jps">
729 <term><command>jps</command></term>
730 <listitem>
731 <para>lists the instrumented JVMs on the target system.</para>
732 <indexterm zone="jdk jps">
733 <primary sortas="b-jps">jps</primary>
734 </indexterm>
735 </listitem>
736 </varlistentry>
737
738 <varlistentry id="jrunscript">
739 <term><command>jrunscript</command></term>
740 <listitem>
741 <para>is a command line script shell.</para>
742 <indexterm zone="jdk jrunscript">
743 <primary sortas="b-jrunscript">jrunscript</primary>
744 </indexterm>
745 </listitem>
746 </varlistentry>
747
748 <varlistentry id="jsadebugd">
749 <term><command>jsadebugd</command></term>
750 <listitem>
751 <para>attaches to a Java process or core file and acts as a
752 debug server.</para>
753 <indexterm zone="jdk jsadebugd">
754 <primary sortas="b-jsadebugd">jsadebugd</primary>
755 </indexterm>
756 </listitem>
757 </varlistentry>
758
759 <varlistentry id="jstack">
760 <term><command>jstack</command></term>
761 <listitem>
762 <para>prints Java stack traces of Java threads for a given
763 Java process, core file, or a remote debug server.</para>
764 <indexterm zone="jdk jstack">
765 <primary sortas="b-jstack">jstack</primary>
766 </indexterm>
767 </listitem>
768 </varlistentry>
769
770 <varlistentry id="jstat">
771 <term><command>jstat</command></term>
772 <listitem>
773 <para>displays performance statistics for an instrumented JVM.</para>
774 <indexterm zone="jdk jstat">
775 <primary sortas="b-jstat">jstat</primary>
776 </indexterm>
777 </listitem>
778 </varlistentry>
779
780 <varlistentry id="jstatd">
781 <term><command>jstatd</command></term>
782 <listitem>
783 <para>is an RMI server application that monitors for the creation
784 and termination of instrumented JVMs.</para>
785 <indexterm zone="jdk jstatd">
786 <primary sortas="b-jstatd">jstatd</primary>
787 </indexterm>
788 </listitem>
789 </varlistentry>
790
[4378f935]791 <varlistentry id="keytool">
792 <term><command>keytool</command></term>
793 <listitem>
794 <para>is a key and certificate management utility.</para>
795 <indexterm zone="jdk keytool">
796 <primary sortas="b-keytool">keytool</primary>
797 </indexterm>
798 </listitem>
799 </varlistentry>
800
801 <varlistentry id="native2ascii">
802 <term><command>native2ascii</command></term>
803 <listitem>
[dae2ba0b]804 <para> converts files that contain non-supported character encoding
[4378f935]805 into files containing Latin-1 or Unicode-encoded characters.</para>
806 <indexterm zone="jdk native2ascii">
807 <primary sortas="b-native2ascii">native2ascii</primary>
808 </indexterm>
809 </listitem>
810 </varlistentry>
811
812 <varlistentry id="orbd">
813 <term><command>orbd</command></term>
814 <listitem>
[dae2ba0b]815 <para>is used to enable clients to transparently locate and invoke
[4378f935]816 persistent objects on servers in the CORBA environment.</para>
817 <indexterm zone="jdk orbd">
818 <primary sortas="b-orbd">orbd</primary>
819 </indexterm>
820 </listitem>
821 </varlistentry>
822
[a8d33f07]823 <varlistentry id="pack200">
824 <term><command>pack200</command></term>
825 <listitem>
826 <para>is a Java application that transforms a jar file into a
827 compressed pack200 file using the Java gzip compressor.</para>
828 <indexterm zone="jdk pack200">
829 <primary sortas="b-pack200">pack200</primary>
830 </indexterm>
831 </listitem>
832 </varlistentry>
833
[4378f935]834 <varlistentry id="policytool">
835 <term><command>policytool</command></term>
836 <listitem>
837 <para>creates and manages a policy file graphically.</para>
838 <indexterm zone="jdk policytool">
839 <primary sortas="b-policytool">policytool</primary>
840 </indexterm>
841 </listitem>
842 </varlistentry>
843
844 <varlistentry id="rmic">
845 <term><command>rmic</command></term>
846 <listitem>
[dae2ba0b]847 <para>generates stub and skeleton class files for remote objects
[a8d33f07]848 from the names of compiled Java classes that contain remote
849 object implementations.</para>
[4378f935]850 <indexterm zone="jdk rmic">
851 <primary sortas="b-rmic">rmic</primary>
852 </indexterm>
853 </listitem>
854 </varlistentry>
855
856 <varlistentry id="rmid">
857 <term><command>rmid</command></term>
858 <listitem>
859 <para>starts the activation system daemon.</para>
860 <indexterm zone="jdk rmid">
861 <primary sortas="b-rmid">rmid</primary>
862 </indexterm>
863 </listitem>
864 </varlistentry>
865
866 <varlistentry id="rmiregistry">
867 <term><command>rmiregistry</command></term>
868 <listitem>
[dae2ba0b]869 <para>creates and starts a remote object registry on the specified
[4378f935]870 port on the current host.</para>
871 <indexterm zone="jdk rmiregistry">
872 <primary sortas="b-rmiregistry">rmiregistry</primary>
873 </indexterm>
874 </listitem>
875 </varlistentry>
876
[a8d33f07]877 <varlistentry id="schemagen">
878 <term><command>schemagen</command></term>
879 <listitem>
880 <para>is a Java XML binding schema generator.</para>
881 <indexterm zone="jdk schemagen">
882 <primary sortas="b-schemagen">schemagen</primary>
883 </indexterm>
884 </listitem>
885 </varlistentry>
886
[4378f935]887 <varlistentry id="serialver">
888 <term><command>serialver</command></term>
889 <listitem>
[dae2ba0b]890 <para>returns the serialVersionUID for one or more classes in a
[4378f935]891 form suitable for copying into an evolving class.</para>
892 <indexterm zone="jdk serialver">
893 <primary sortas="b-serialver">serialver</primary>
894 </indexterm>
895 </listitem>
896 </varlistentry>
897
898 <varlistentry id="servertool">
899 <term><command>servertool</command></term>
900 <listitem>
[dae2ba0b]901 <para>provides an ease-of-use interface for application programmers
[4378f935]902 to register, unregister, startup and shutdown a server.</para>
903 <indexterm zone="jdk servertool">
904 <primary sortas="b-servertool">servertool</primary>
905 </indexterm>
906 </listitem>
907 </varlistentry>
908
909 <varlistentry id="tnameserv">
910 <term><command>tnameserv</command></term>
911 <listitem>
[a8d33f07]912 <para>starts the Java IDL name server.</para>
[4378f935]913 <indexterm zone="jdk tnameserv">
914 <primary sortas="b-tnameserv">tnameserv</primary>
915 </indexterm>
916 </listitem>
917 </varlistentry>
918
[a8d33f07]919 <varlistentry id="unpack200">
920 <term><command>unpack200</command></term>
921 <listitem>
922 <para>is a native implementation that transforms a packed file
923 produced by <application>pack200</application> into a jar
924 file.</para>
925 <indexterm zone="jdk unpack200">
926 <primary sortas="b-unpack200">unpack200</primary>
927 </indexterm>
928 </listitem>
929 </varlistentry>
930
931 <varlistentry id="wsgen">
932 <term><command>wsgen</command></term>
933 <listitem>
934 <para>generates JAX-WS portable artifacts used in JAX-WS
935 web services.</para>
936 <indexterm zone="jdk wsgen">
937 <primary sortas="b-wsgen">wsgen</primary>
938 </indexterm>
939 </listitem>
940 </varlistentry>
941
942 <varlistentry id="wsimport">
943 <term><command>wsimport</command></term>
944 <listitem>
945 <para>generates JAX-WS portable artifacts.</para>
946 <indexterm zone="jdk wsimport">
947 <primary sortas="b-wsimport">wsimport</primary>
948 </indexterm>
949 </listitem>
950 </varlistentry>
951
952 <varlistentry id="xjc">
953 <term><command>xjc</command></term>
954 <listitem>
955 <para>is a Java XML binding compiler.</para>
956 <indexterm zone="jdk xjc">
957 <primary sortas="b-xjc">xjc</primary>
958 </indexterm>
959 </listitem>
960 </varlistentry>
961
[4378f935]962 </variablelist>
963
964 </sect2>
[74c1100]965
966</sect1>
Note: See TracBrowser for help on using the repository browser.