source: general/prog/j2sdk.xml@ 76a2160

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 6.0 6.1 6.2 6.2.0 6.2.0-rc1 6.2.0-rc2 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 76a2160 was 4f6275fd, checked in by Randy McMurchy <randy@…>, 20 years ago

Change hardcoded version numbers to entities in various packages

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

  • Property mode set to 100644
File size: 16.2 KB
RevLine 
[52d29f7]1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
3 "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
7 <!ENTITY j2sdk-download-http "http://freshmeat.net/projects/sunjdk">
8 <!ENTITY j2sdk-download-ftp " ">
9 <!ENTITY j2sdk-bin-size "35 MB">
10 <!ENTITY j2sdk-src-size "77 MB">
11 <!ENTITY j2sdk-src-buildsize "1810 MB">
12 <!ENTITY j2sdk-time "85 SBU">
13]>
14
[06aea651]15<sect1 id="j2sdk" xreflabel="J2SDK-&j2sdk-src-version;">
[19aa75a]16<?dbhtml filename="j2sdk.html" ?>
[06aea651]17<title>J2SDK-&j2sdk-src-version;</title>
[74c1100]18
[52d29f7]19<sect2>
20<title>Introduction to j2sdk</title>
[014d11ad]21
[52d29f7]22<para>The <application>J2SDK</application> package contains Sun's
23<application>Java</application> development environment. This is useful for
24developing <application>Java</application> programs and provides the runtime
[014d11ad]25environment necessary to run <application>Java</application> programs. It also
[52d29f7]26includes a plug-in for browsers so that they can be <application>Java
27</application> aware.</para>
[014d11ad]28
[52d29f7]29<para>
30The <acronym>JDK</acronym> comes in two flavors, a precompiled binary and a
31source package. Previously, the plugin included in the <acronym>JDK</acronym> binary
32package was unusable on <acronym>LFS</acronym>
33owing to incompatibilities with <acronym>GCC</acronym>-3 compiled browsers.
34This is not the case anymore.</para>
[014d11ad]35
[52d29f7]36<para>The source package requires registration at the Sun
37developer site and accepting the Sun Community Source License.
38The source code cannot be downloaded from some countries, so for users
39from those countries, the binary may be the only option.</para>
[014d11ad]40
41<para>Even if you plan on compiling the <acronym>JDK</acronym> source, you will
[52d29f7]42need to download the binary version to bootstrap the <acronym>JDK</acronym>
43build. Follow the link below to download both source and binary packages. When
44downloading the source also download the <application>Mozilla</application>
45headers package available at the same location.</para>
[014d11ad]46
[52d29f7]47<!--
[014d11ad]48<para>For users who cannot download the <application>J2SDK</application>
49source owing to license restrictions, <application>blackdown
[52d29f7]50</application> has an <acronym>GCC</acronym>-3 based precompiled version.
51Check out <ulink url="http://www.blackdown.org/"/> for more
52information.</para>
53-->
[014d11ad]54
[52d29f7]55<sect3><title>Package information</title>
56<itemizedlist spacing='compact'>
57<listitem><para>Download (HTTP): <ulink
58url="&j2sdk-download-http;"/></para></listitem>
59
60<!--
61<listitem><para>Download (FTP): <ulink
62url="&j2sdk-download-ftp;"/></para></listitem>
63-->
64<listitem><para>Version used (binary):
65&j2sdk-bin-version;</para></listitem>
66<listitem><para>Download size (binary): &j2sdk-bin-size;</para></listitem>
67<listitem><para>Download size (source): &j2sdk-src-size;</para></listitem>
68<listitem><para>Estimated Disk space required:
69&j2sdk-src-buildsize;</para></listitem>
70<listitem><para>Estimated build time:
71&j2sdk-time;</para></listitem></itemizedlist>
72</sect3>
[014d11ad]73
[52d29f7]74<sect3><title>Additional downloads</title>
75<itemizedlist spacing='compact'>
[4f6275fd]76<listitem><para><ulink url="&patch-root;/j2sdk-&j2sdk-src-version;-fix_inline_asm-1.patch"/></para></listitem>
77<listitem><para><ulink url="&patch-root;/j2sdk-&j2sdk-src-version;-gcc33-1.patch"/></para></listitem>
78<listitem><para><ulink url="&patch-root;/j2sdk-&j2sdk-src-version;-motif_mkmsgcat-1.patch"/></para></listitem>
79<listitem><para><ulink url="&patch-root;/j2sdk-&j2sdk-src-version;-remove_debug_image-1.patch"/></para></listitem>
80<listitem><para><ulink url="&patch-root;/j2sdk-&j2sdk-src-version;-remove_fixed_paths-1.patch"/></para></listitem>
81<listitem><para><ulink url="&patch-root;/j2sdk-&j2sdk-src-version;-static_cxx-1.patch"/></para></listitem>
82<listitem><para><ulink url="&patch-root;/j2sdk-&j2sdk-src-version;-ash-1.patch"/> (Only required if /bin/sh is symlinked to <xref linkend="ash"/>)</para></listitem>
[52d29f7]83</itemizedlist>
84</sect3>
[014d11ad]85
[52d29f7]86<sect3><title><application>J2SDK</application> dependencies</title>
87<sect4><title>Required</title>
[014d11ad]88<para>X (<xref linkend="xfree86"/> or <xref linkend="xorg"/>),
89<xref linkend="zip"/>, <xref linkend="unzip"/>, <xref linkend="cpio"/>,
90<xref linkend="alsa"/>, and <xref linkend="tcsh"/>
[52d29f7]91</para></sect4>
92</sect3>
[014d11ad]93
[52d29f7]94</sect2>
95
96<sect2>
97<title>Installation of <application>J2SDK</application></title>
[014d11ad]98
[52d29f7]99<para>Both versions will be installed in parallel. You may choose to keep
100either or both.</para>
[014d11ad]101
[52d29f7]102<para>Installation of the precompiled <acronym>JDK</acronym> is easy:
103create a directory to install from, copy the .bin there, and run the
104following commands:</para>
[014d11ad]105
[52d29f7]106<screen><userinput><command>VERSION=&j2sdk-bin-version; &amp;&amp;
107MV=`echo $VERSION | cut -d "_" -f 1,1` &amp;&amp;
108V=`echo ${VERSION} | sed -e "s/\./_/g"` &amp;&amp;
109sed -i "s:^PATH=.*::" j2sdk-${V}-linux-i?86.bin &amp;&amp;
110chmod +x j2sdk-${V}-linux-i?86.bin &amp;&amp;
111mkdir -p bin &amp;&amp;
112ln -sf /bin/true bin/more &amp;&amp;
113yes | PATH=$PWD/bin:$PATH ./j2sdk-${V}-linux-i?86.bin &amp;&amp;
114cd j2sdk${VERSION} &amp;&amp;
115install -d /opt/j2sdk/j2sdk-precompiled-${MV} &amp;&amp;
116mv * /opt/j2sdk/j2sdk-precompiled-${MV}</command></userinput></screen>
[014d11ad]117
118<para>The binary version is now installed.</para>
119
120<para>If you don't want to compile the source or are not in a position to
121download the source owing to license restrictions, skip ahead to the
122configuration section.</para>
123
[52d29f7]124<para>Add the recently compiled <acronym>JDK</acronym> to the path.</para>
[014d11ad]125
[52d29f7]126<screen><userinput><command>export JAVA_HOME=/opt/j2sdk/j2sdk-precompiled-${MV} &amp;&amp;
127export PATH=$PATH:${JAVA_HOME}/bin</command></userinput></screen>
[014d11ad]128
[52d29f7]129<para>Unzip the source:</para>
[014d11ad]130
[52d29f7]131<screen><userinput><command>VERSION=&j2sdk-src-version; &amp;&amp;
132V=`echo $VERSION | sed -e "s/\./_/g"` &amp;&amp;
133unzip j2sdk-${V}-src-scsl.zip &amp;&amp;
134unzip j2sdk-${V}-mozilla_headers-unix.zip &amp;&amp;
135unzip j2sdk-${V}-bin-scsl.zip</command></userinput></screen>
[014d11ad]136
[52d29f7]137<para>Apply all the patches downloaded above.</para>
[014d11ad]138
139<screen><userinput><command>for PATCH in fix_inline_asm-1 gcc33-1 \
140 motif_mkmsgcat-1 remove_debug_image-1 remove_fixed_paths-1 \
141 static_cxx-1
[52d29f7]142do
[4f6275fd]143 patch -Np1 -i j2sdk-&j2sdk-src-version;-$PATCH.patch
[52d29f7]144done</command></userinput></screen>
[014d11ad]145
[52d29f7]146<para>Set/unset some variables which affect the build:</para>
147<screen><userinput><command>export ALT_BOOTDIR="$JAVA_HOME" &amp;&amp;
148unset JAVA_HOME &amp;&amp;
149unset CLASSPATH
150unset CFLAGS
151unset CXXFLAGS
152unset LDFLAGS
153export ALT_DEVTOOLS_PATH="/usr/bin" &amp;&amp;
154export BUILD_NUMBER="blfs-`date +%s`" &amp;&amp;
155export DEV_ONLY=true &amp;&amp;
156export ALT_MOZILLA_PATH=$PWD &amp;&amp;
157export INSANE=true &amp;&amp;
158export MAKE_VERBOSE=true &amp;&amp;
159export ALT_CACERTS_FILE=${ALT_BOOTDIR}/jre/lib/security/cacerts</command></userinput></screen>
[014d11ad]160
161<warning><para>Setting CFLAGS/CXXFLAGS/LDFLAGS is guaranteed to make the build
162fail. If you are interested in optimizing the build, set
163OTHER_CFLAGS/OTHER_CXXFLAGS/OTHER_LDFLAGS instead.</para></warning>
164
[52d29f7]165<para>Additionally, if you would like to make in parallel, add the following
166(adjust <envar>MAKE_PARALLEL</envar> to your liking):</para>
167<screen><userinput><command>export HOTSPOT_BUILD_JOBS=$MAKE_PARALLEL</command></userinput></screen>
[014d11ad]168
169<para>If the included <application>Motif</application> doesn't build properly,
170the error is noticed much later in the build. A solution is to build the
171<application>Motif</application> library before compiling the
172<application>J2SDK</application>.</para>
173
[52d29f7]174<screen><userinput><command>cd motif/lib/Xm &amp;&amp;
175make &amp;&amp;
176cd ../../..</command></userinput></screen>
[014d11ad]177
[52d29f7]178<para>Make and Install <application>J2SDK</application> with the following
179commands. There will be a lot of messages about missing files that look like
[014d11ad]180errors. As long as the build doesn't stop, the messages are harmless, so ignore
[52d29f7]181them.</para>
[014d11ad]182
[52d29f7]183<screen><userinput><command>cd control/make &amp;&amp;
184make &amp;&amp;
185cd ../.. &amp;&amp;
186cd control/build/linux-i?86 &amp;&amp;
187cp -a j2sdk-image /opt/j2sdk/j2sdk-&j2sdk-src-version;</command></userinput></screen>
[014d11ad]188
[52d29f7]189</sect2>
190
191<sect2>
192<title>Command explanations</title>
[014d11ad]193
[52d29f7]194<para><command>export ALT_BOOTDIR="$JAVA_HOME"</command>: This var sets
[014d11ad]195location of the bootstrap <acronym>JDK</acronym>.</para>
196
[52d29f7]197<para><command>export ALT_MOZILLA_PATH=$PWD</command>: This sets the
198variable that points to where you unzipped the <application>Mozilla
199</application> headers.</para>
[014d11ad]200
[52d29f7]201<para><command>export ALT_DEVTOOLS_PATH="/usr/bin"</command>: This
[014d11ad]202changes the location where the build finds the needed executables.</para>
203
[52d29f7]204<para><command>export BUILD_NUMBER="blfs-`date +%s`"</command>: This will
205help you identify this compiled version of the runtime environment and
206virtual machine by appending this information to the version in the
207output to <command>java -version</command>.</para>
[014d11ad]208
[52d29f7]209<para><command>export DEV_ONLY=true</command>: This command
210eliminates compiling the documentation and eliminates a dependency for
[014d11ad]211<application>rpm</application>.</para>
212
[52d29f7]213<para><command>unset JAVA_HOME</command>: This clears the
[014d11ad]214<envar>JAVA_HOME</envar> variable as recommended by the build
215instructions.</para>
216
[52d29f7]217<para><command>unset CLASSPATH</command>: This clears the
[014d11ad]218<envar>CLASSPATH</envar> variable as per the recommendations in the build
219instructions.</para>
220
[52d29f7]221<para><command>unset CFLAGS...</command>: These flags cause miscompilation
222of the build. Never set these.</para>
[014d11ad]223
[52d29f7]224<para><command>export INSANE=true</command>: Unless you specify that you
225are insane the build will not proceed. The certified platform for the build is
226Redhat 6.1. The above variable ensures that all the errors related to
227compiling on a non-certified platform will be converted to warnings.</para>
[014d11ad]228
[52d29f7]229<para><command>export MAKE_VERBOSE=true</command>: Allows the current
230compilation command to be displayed on the console.</para>
[014d11ad]231
[52d29f7]232<para><command>export ALT_CACERTS_FILE...</command>: Specifies the
233certificate file to use.</para>
[014d11ad]234
[52d29f7]235</sect2>
236
237<sect2>
238<title>Configuring <application>J2SDK</application></title>
[014d11ad]239
[52d29f7]240<sect3><title>Configuration Information</title>
[014d11ad]241
[52d29f7]242<para>We have two Java 2 <acronym>SDK</acronym>'s installed in
243<filename>/opt/j2sdk</filename>. Decide on which one you
244would like to use as the default. For example if you decide to use the source
245compiled <application>J2SDK</application>, do the following:</para>
[014d11ad]246
[52d29f7]247<screen><userinput><command>ln -nsf j2sdk-&j2sdk-src-version; /opt/j2sdk/j2sdk</command></userinput></screen>
[014d11ad]248
[52d29f7]249<para>Add the following lines to your shell startup file (e.g.,
250<filename>/etc/profile</filename>).</para>
[014d11ad]251
[52d29f7]252<screen><userinput>export JAVA_HOME=/opt/j2sdk/j2sdk
253export PATH=$PATH:$JAVA_HOME/bin</userinput></screen>
[014d11ad]254
[52d29f7]255<para>Add <filename>$JAVA_HOME/man</filename> to your
256<envar>MANPATH</envar> variable or to
257<filename>/etc/man.conf</filename></para>
[014d11ad]258
[52d29f7]259<para>The <application>Java</application> plugin is in the directory
260<filename class="directory">$JAVA_HOME/jre/plugin/i?86/ns610/</filename>.
261Make a symbolic link to the file in that directory from your plugins directory.</para>
[014d11ad]262
[52d29f7]263</sect3>
[014d11ad]264
[52d29f7]265<sect3><title>Handling CLASSPATH</title>
[014d11ad]266
[52d29f7]267<para>When compiling packages, the <envar>CLASSPATH</envar> environment variable
[014d11ad]268is used by JDK to locate classes at compile-time and run-time. It is tedious to
269add all the classes used to the <envar>CLASSPATH</envar> manually. You may add
[52d29f7]270the following lines to your shell startup file to set <envar>CLASSPATH</envar>
271automatically to include all JAR files in a specified directory, which in
272the example below is <filename>/usr/lib/auto-java-classpath</filename>.</para>
[014d11ad]273
[52d29f7]274<screen><userinput>AUTO_CLASSPATH_DIR=/usr/lib/auto-java-classpath
275if [ -z $CLASSPATH ]
276then
277 CLASSPATH=.:$AUTO_CLASSPATH_DIR
278else
279 CLASSPATH=$CLASSPATH:.:$AUTO_CLASSPATH_DIR
280fi
281for i in $(ls $AUTO_CLASSPATH_DIR/*.jar 2>/dev/null)
282do
283 CLASSPATH=$CLASSPATH:$i
284done</userinput></screen>
[014d11ad]285
[52d29f7]286</sect3>
[014d11ad]287
[52d29f7]288</sect2>
289
290<sect2>
291<title>Contents</title>
[014d11ad]292
[52d29f7]293<para>The <application>J2SDK</application> package contains
294<command>appletviewer</command>,
295<command>extcheck</command>, <command>idlj</command>,
296<command>jar</command>, <command>jarsigner</command>,
297<command>java</command>, <command>javac</command>,
298<command>javadoc</command>, <command>javah</command>,
299<command>javap</command>, <command>jdb</command>,
300<command>keytool</command>, <command>native2ascii</command>,
301<command>orbd</command>, <command>policytool</command>,
302<command>rmic</command>, <command>rmid</command>,
303<command>rmiregistry</command>, <command>rmiregistry</command>,
304<command>serialver</command>, <command>servertool</command> and
305<command>tnameserv</command>.</para>
[014d11ad]306
[52d29f7]307</sect2>
[014d11ad]308
[52d29f7]309<sect2><title>Description</title>
[014d11ad]310
[52d29f7]311<sect3><title>appletviewer</title>
[014d11ad]312<para><command>appletviewer</command> runs <application>Java</application>
313applets outside of the context of a browser.</para></sect3>
314
[52d29f7]315<sect3><title>extcheck</title>
316<para><command>extcheck</command> checks a specified <filename>JAR</filename>
317file for title and version conflicts with any extensions installed in the
318<acronym>JDK</acronym> software.</para></sect3>
[014d11ad]319
[52d29f7]320<sect3><title>idlj</title>
321<para><command>idlj</command> generates <application>Java</application>
322bindings from a given <acronym>IDL</acronym> file.</para></sect3>
[014d11ad]323
[52d29f7]324<sect3><title>jar</title>
325<para><command>jar</command> combines multiple files into a single
326<acronym>JAR</acronym> archive file.</para></sect3>
[014d11ad]327
[52d29f7]328<sect3><title>jarsigner</title>
329<para><command>jarsigner</command> signs <filename>JAR</filename>
330(Java ARchive) files and verifies the signatures and integrity of a signed
331<filename>JAR</filename>.</para></sect3>
[014d11ad]332
[52d29f7]333<sect3><title>java</title>
334<para><command>java</command> launches a <application>Java</application>
335application by starting a <application>Java</application> runtime
336environment, loading a specified class and invoking its main
337method.</para></sect3>
[014d11ad]338
[52d29f7]339<sect3><title>javac</title>
340<para><command>javac</command> reads class and interface definitions, written
341in the <application>Java</application> programming language, and compiles them
342into bytecode class files.</para></sect3>
[014d11ad]343
[52d29f7]344<sect3><title>javadoc</title>
345<para><command>javadoc</command> parses the declarations and documentation
346comments in a set of <application>Java</application> source files and produces
347a corresponding set of <acronym>HTML</acronym> pages describing the classes,
348interfaces, constructors, methods, and fields.</para></sect3>
[014d11ad]349
[52d29f7]350<sect3><title>javah</title>
351<para><command>javah</command> generates <application>C</application> header
352and source files that are needed to implement native methods.</para></sect3>
[014d11ad]353
[52d29f7]354<sect3><title>javap</title>
355<para><command>javap</command> disassembles a
356<application>Java</application> class file.</para></sect3>
[014d11ad]357
[52d29f7]358<sect3><title>jdb</title>
359<para><command>jdb</command> is a simple command-line debugger for
360<application>Java</application> classes.</para></sect3>
[014d11ad]361
[52d29f7]362<sect3><title>keytool</title>
[014d11ad]363<para><command>keytool</command> is a key and certificate management
364utility.</para></sect3>
365
[52d29f7]366<sect3><title>native2ascii</title>
367<para><command>native2ascii</command> converts files that contain non-supported
[014d11ad]368character encoding into files containing Latin-1 or Unicode-encoded
369characters.</para></sect3>
370
[52d29f7]371<sect3><title>orbd</title>
372<para><command>orbd</command> is used to enable clients to transparently locate
373and invoke persistent objects on servers in the <acronym>CORBA</acronym>
374environment.</para></sect3>
[014d11ad]375
[52d29f7]376<sect3><title>policytool</title>
377<para><command>policytool</command> creates and manages a policy file
378graphically.</para></sect3>
[014d11ad]379
[52d29f7]380<sect3><title>rmic</title>
381<para><command>rmic</command> generates stub and skeleton class files for
382remote objects from the names of compiled <application>Java</application>
383classes that contain remote object implementations.</para></sect3>
[014d11ad]384
[52d29f7]385<sect3><title>rmid</title>
386<para><command>rmid</command> starts the activation system daemon.</para>
387</sect3>
[014d11ad]388
[52d29f7]389<sect3><title>rmiregistry</title>
390<para><command>rmiregistry</command> creates and starts a remote object
391registry on the specified port on the current host.</para></sect3>
[014d11ad]392
[52d29f7]393<sect3><title>serialver</title>
394<para><command>serialver</command> returns the serialVersionUID for one or
395more classes in a form suitable for copying into an evolving class.</para>
396</sect3>
[014d11ad]397
[52d29f7]398<sect3><title>servertool</title>
399<para><command>servertool</command> provides an ease-of-use interface for
[014d11ad]400application programmers to register, unregister, startup and shutdown a
401server.</para></sect3>
402
[52d29f7]403<sect3><title>tnameserv</title>
404<para><command>tnameserv</command> starts the <application>Java</application>
405<acronym>IDL</acronym> name server.</para></sect3>
406
407</sect2>
[74c1100]408
409</sect1>
410
Note: See TracBrowser for help on using the repository browser.