1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
5 | %general-entities;
|
---|
6 |
|
---|
7 | <!ENTITY ojdk-tarball "jdk-&openjdk-version;-ga.tar.gz">
|
---|
8 | <!ENTITY ojdk-repo "https://github.com/openjdk/jdk20u">
|
---|
9 | <!ENTITY ojdk-download "&ojdk-repo;/archive/&ojdk-tarball;">
|
---|
10 |
|
---|
11 | <!ENTITY anduin-download "&sources-anduin-http;/OpenJDK/OpenJDK-&openjdk-version;">
|
---|
12 |
|
---|
13 | <!ENTITY ojdk-md5sum "2a85b13d3d6ef6abfe8d7775481b89a9">
|
---|
14 | <!ENTITY ojdk-size "104 MB">
|
---|
15 |
|
---|
16 | <!ENTITY jtreg-version "7.2+1">
|
---|
17 | <!ENTITY jtreg-download "&anduin-download;/jtreg-&jtreg-version;.tar.gz">
|
---|
18 | <!ENTITY jtreg-md5sum "530eb67155e0a399d1a68b2f8584613a">
|
---|
19 | <!ENTITY jtreg-size "8.9 MB">
|
---|
20 |
|
---|
21 | <!ENTITY ojdk-bdsize "3.5 GB (add 789 MB for tests)">
|
---|
22 | <!ENTITY ojdk-time "6.1 SBU with 4 jobs (add 40 SBU for tests with 4 jobs)">
|
---|
23 | ]>
|
---|
24 |
|
---|
25 | <sect1 id="openjdk" xreflabel="OpenJDK-&openjdk-version;">
|
---|
26 | <?dbhtml filename="openjdk.html" ?>
|
---|
27 |
|
---|
28 |
|
---|
29 | <title>OpenJDK-&openjdk-version;</title>
|
---|
30 |
|
---|
31 | <indexterm zone="openjdk">
|
---|
32 | <primary sortas="a-OpenJDK">OpenJDK</primary>
|
---|
33 | </indexterm>
|
---|
34 |
|
---|
35 | <sect2 role="package">
|
---|
36 | <title>Introduction to OpenJDK</title>
|
---|
37 |
|
---|
38 | <para>
|
---|
39 | <application>OpenJDK</application> is an open-source implementation
|
---|
40 | of Oracle's Java Standard Edition platform.
|
---|
41 | <application>OpenJDK</application> is useful for developing
|
---|
42 | <application>Java</application> programs, and provides a complete
|
---|
43 | runtime environment to run <application>Java</application> programs.
|
---|
44 | </para>
|
---|
45 |
|
---|
46 | &lfs113_checked;
|
---|
47 |
|
---|
48 | <para>
|
---|
49 | OpenJDK is GPL'd code, with a special exception made for non-free
|
---|
50 | projects to use these classes in their proprietary products.
|
---|
51 | In similar fashion to the LGPL, which allows non-free programs to link
|
---|
52 | to libraries provided by free software, the
|
---|
53 | <ulink url="https://openjdk.org/legal/gplv2+ce.html">GNU
|
---|
54 | General Public License, version 2, with the Classpath Exception</ulink>
|
---|
55 | allows third party programs to use classes provided by free software
|
---|
56 | without the requirement that the third party software also be free. As
|
---|
57 | with the LGPL, any modifications made to the free software portions of a
|
---|
58 | third party application, must also be made freely available.
|
---|
59 | </para>
|
---|
60 |
|
---|
61 | <note>
|
---|
62 | <para>
|
---|
63 | The <application>OpenJDK</application> source includes a very
|
---|
64 | thorough, open source test suite using the
|
---|
65 | <application>JTreg</application> test harness. The testing instructions
|
---|
66 | below allow testing the just built JDK for reasonable compatibility
|
---|
67 | with the proprietary Oracle JDK. However, in order for an independent
|
---|
68 | implementation to claim compatibility, it must pass a proprietary
|
---|
69 | <application>JCK/TCK</application> test suite. No claims of
|
---|
70 | compatibility, or even partial compatibility, may be made without passing
|
---|
71 | an approved test suite.
|
---|
72 | </para>
|
---|
73 |
|
---|
74 | <para>
|
---|
75 | Oracle does provide free community access, on a case by case basis, to
|
---|
76 | a closed toolkit to ensure 100% compatibility with its proprietary JDK.
|
---|
77 | Neither the binary version provided on the <xref linkend="java"/> page
|
---|
78 | nor the JVM built with the instructions below have been tested against
|
---|
79 | the <ulink
|
---|
80 | url="https://openjdk.java.net/groups/conformance/JckAccess/jck-access.html">
|
---|
81 | TCK</ulink>. Any version that is built using the instructions given,
|
---|
82 | cannot claim to be compatible with the proprietary JDK, without the
|
---|
83 | user applying for, and completing the compatibility tests themselves.
|
---|
84 | </para>
|
---|
85 |
|
---|
86 | <para>
|
---|
87 | With that in mind, the binaries produced using this build method are
|
---|
88 | regularly tested against the TCK by the members listed on the site
|
---|
89 | above. In addition to the community license above, an educational,
|
---|
90 | non-commercial license for the TCK can be obtained <ulink
|
---|
91 | url="https://www.oracle.com/technetwork/java/index-137188.html">
|
---|
92 | here</ulink>.
|
---|
93 | </para>
|
---|
94 | </note>
|
---|
95 |
|
---|
96 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
97 | <itemizedlist spacing="compact">
|
---|
98 | <listitem>
|
---|
99 | <para>
|
---|
100 | Download (HTTP): <ulink url="&ojdk-download;"/>
|
---|
101 | </para>
|
---|
102 | </listitem>
|
---|
103 | <listitem>
|
---|
104 | <para>
|
---|
105 | Download (FTP): <ulink url=" "/>
|
---|
106 | </para>
|
---|
107 | </listitem>
|
---|
108 | <listitem>
|
---|
109 | <para>
|
---|
110 | Download MD5 sum: &ojdk-md5sum;
|
---|
111 | </para>
|
---|
112 | </listitem>
|
---|
113 | <listitem>
|
---|
114 | <para>
|
---|
115 | Download Size: &ojdk-size;
|
---|
116 | </para>
|
---|
117 | </listitem>
|
---|
118 | <listitem>
|
---|
119 | <para>
|
---|
120 | Estimated disk space required: &ojdk-bdsize;
|
---|
121 | </para>
|
---|
122 | </listitem>
|
---|
123 | <listitem>
|
---|
124 | <para>
|
---|
125 | Estimated build time: &ojdk-time;
|
---|
126 | </para>
|
---|
127 | </listitem>
|
---|
128 | </itemizedlist>
|
---|
129 |
|
---|
130 | <bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
---|
131 |
|
---|
132 | <para>
|
---|
133 | <emphasis role="strong">Optional test harness</emphasis>
|
---|
134 | </para>
|
---|
135 |
|
---|
136 | <itemizedlist spacing='compact'>
|
---|
137 | <listitem>
|
---|
138 | <para>
|
---|
139 | <ulink url="&jtreg-download;"/>
|
---|
140 | </para>
|
---|
141 | </listitem>
|
---|
142 | <listitem>
|
---|
143 | <para>
|
---|
144 | Download MD5 sum: &jtreg-md5sum;
|
---|
145 | </para>
|
---|
146 | </listitem>
|
---|
147 | <listitem>
|
---|
148 | <para>
|
---|
149 | Download Size: &jtreg-size;
|
---|
150 | </para>
|
---|
151 | </listitem>
|
---|
152 | </itemizedlist>
|
---|
153 | <!--
|
---|
154 | <bridgehead renderas="sect4">Required patch</bridgehead>
|
---|
155 |
|
---|
156 | <itemizedlist spacing='compact'>
|
---|
157 | <listitem>
|
---|
158 | <para>
|
---|
159 | <ulink url="&patch-root;/openjdk-&openjdk-version;-make_4.3_fix-1.patch"/>
|
---|
160 | </para>
|
---|
161 | </listitem>
|
---|
162 | </itemizedlist>
|
---|
163 | -->
|
---|
164 | <bridgehead renderas="sect3">OpenJDK Dependencies</bridgehead>
|
---|
165 |
|
---|
166 | <bridgehead renderas="sect4">Required Dependencies</bridgehead>
|
---|
167 | <para role="required">
|
---|
168 | An existing binary (<xref linkend="java"/> or an earlier built
|
---|
169 | version of this package. The instructions below assume that
|
---|
170 | you are using <xref linkend="ojdk-conf"/>),
|
---|
171 | <xref linkend="alsa-lib"/>,
|
---|
172 | <xref linkend="cpio"/>,
|
---|
173 | <xref linkend="cups"/>,
|
---|
174 | <xref linkend="unzip"/>,
|
---|
175 | <xref linkend="which"/>,
|
---|
176 | <xref linkend="xorg7-lib"/>, and
|
---|
177 | <xref linkend="zip"/>
|
---|
178 | </para>
|
---|
179 |
|
---|
180 | <bridgehead renderas="sect4">Recommended</bridgehead>
|
---|
181 | <para role="recommended">
|
---|
182 | <xref linkend="make-ca"/>,
|
---|
183 | <xref linkend="giflib"/>,
|
---|
184 | <xref linkend="lcms2"/>,
|
---|
185 | <xref linkend="libjpeg"/>,
|
---|
186 | <xref linkend="libpng"/>, and
|
---|
187 | <xref linkend="wget"/>
|
---|
188 | </para>
|
---|
189 |
|
---|
190 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
191 | <para role="optional">
|
---|
192 | <xref linkend="git"/>,
|
---|
193 | <xref linkend="graphviz"/>,
|
---|
194 | <xref linkend="mercurial"/>,
|
---|
195 | <!-- not needed now, it seems
|
---|
196 | an X Window manager such as <xref linkend="twm"/> (for the tests), and
|
---|
197 | -->
|
---|
198 | <ulink url="https://ccache.dev/">ccache</ulink>,
|
---|
199 | <ulink url="https://pandoc.org/">pandoc</ulink>, and
|
---|
200 | <ulink url="https://zlib.net/pigz">pigz</ulink>
|
---|
201 | </para>
|
---|
202 |
|
---|
203 |
|
---|
204 | </sect2>
|
---|
205 |
|
---|
206 | <sect2 role="installation">
|
---|
207 | <title>Installation of OpenJDK</title>
|
---|
208 |
|
---|
209 | <para>
|
---|
210 | If you have downloaded the optional test harness, unpack it now:
|
---|
211 | </para>
|
---|
212 |
|
---|
213 | <screen><userinput>tar -xf ../jtreg-&jtreg-version;.tar.gz</userinput></screen>
|
---|
214 | <!--
|
---|
215 | <para>
|
---|
216 | Apply a patch to allow building with make-4.3:
|
---|
217 | </para>
|
---|
218 |
|
---|
219 | <screen><userinput>patch -p1 -i ../openjdk-&openjdk-version;-make_4.3_fix-1.patch</userinput></screen>
|
---|
220 |
|
---|
221 | <para>
|
---|
222 | Fix an issue coming from a removed header in glibc-2.32:
|
---|
223 | </para>
|
---|
224 |
|
---|
225 | <screen><userinput>sed -i /sysctl/d \
|
---|
226 | src/jdk.incubator.jpackage/unix/native/libapplauncher/PosixPlatform.cpp</userinput></screen>
|
---|
227 | -->
|
---|
228 | <note>
|
---|
229 | <para>
|
---|
230 | Before proceeding, you should ensure that your environment
|
---|
231 | <envar>PATH</envar> variable contains the location of the Java
|
---|
232 | compiler used for bootstrapping <application>OpenJDK</application>.
|
---|
233 | This is the only requirement for the environment. Modern Java
|
---|
234 | installations do not need <envar>JAVA_HOME</envar> and
|
---|
235 | <envar>CLASSPATH</envar> is not used here. Furthermore, OpenJDK
|
---|
236 | developers recommend unsetting <envar>JAVA_HOME</envar>.
|
---|
237 | </para>
|
---|
238 |
|
---|
239 | <para>
|
---|
240 | The build system does not allow the <option>-j</option> switch in
|
---|
241 | <envar>MAKEFLAGS</envar>. See the command explanation for
|
---|
242 | <option>--with-jobs=</option>
|
---|
243 | for more information on customizing parallelization.
|
---|
244 | </para>
|
---|
245 | </note>
|
---|
246 |
|
---|
247 | <para>
|
---|
248 | Configure and build the package with the following commands:
|
---|
249 | </para>
|
---|
250 |
|
---|
251 | <screen><userinput>unset JAVA_HOME &&
|
---|
252 | bash configure --enable-unlimited-crypto \
|
---|
253 | --disable-warnings-as-errors \
|
---|
254 | --with-stdc++lib=dynamic \
|
---|
255 | --with-giflib=system \
|
---|
256 | --with-jtreg=$PWD/jtreg \
|
---|
257 | --with-lcms=system \
|
---|
258 | --with-libjpeg=system \
|
---|
259 | --with-libpng=system \
|
---|
260 | --with-zlib=system \
|
---|
261 | --with-version-build="&openjdk-build;" \
|
---|
262 | --with-version-pre="" \
|
---|
263 | --with-version-opt="" \
|
---|
264 | --with-cacerts-file=/etc/pki/tls/java/cacerts &&
|
---|
265 | make images</userinput></screen>
|
---|
266 |
|
---|
267 | <para>
|
---|
268 | To test the results, you will need to execute the jtreg program.
|
---|
269 | You can set the number of concurrent tests by adding the
|
---|
270 | <parameter>-conc:<replaceable><X></replaceable></parameter>
|
---|
271 | value in the below command (tests will run sequentially otherwise):
|
---|
272 | </para>
|
---|
273 |
|
---|
274 | <screen remap="test"><userinput>export JT_JAVA=$(echo $PWD/build/*/jdk) &&
|
---|
275 | jtreg/bin/jtreg -jdk:$JT_JAVA -automatic -ignore:quiet -v1 \
|
---|
276 | test/jdk:tier1 test/langtools:tier1 &&
|
---|
277 | unset JT_JAVA</userinput></screen>
|
---|
278 |
|
---|
279 | <para>
|
---|
280 | For more control over the test suite, review the documentation
|
---|
281 | available in <filename>jtreg/doc/jtreg/usage.txt</filename>. To review
|
---|
282 | the results, see the files
|
---|
283 | <filename>JTreport/test_{jdk,langtools}/text/stats.txt</filename> and
|
---|
284 | <filename>JTreport/test_{jdk,langtools}/text/summary.txt</filename>.
|
---|
285 | You should expect to see around 60 failures and 10 errors.
|
---|
286 | </para>
|
---|
287 | <!--
|
---|
288 | 14.0.1+7:
|
---|
289 | for x86_64: passed: 5,836; failed: 42; error: 50
|
---|
290 | 17.0.2+8:
|
---|
291 | for x86_64: passed: 6,238; failed: 48; error: 13
|
---|
292 | for i686: passed: 6,208; failed: 29; error: 6
|
---|
293 | 18.0.1+10:
|
---|
294 | for x86_64: passed: 6,323; failed: 53; error: 14
|
---|
295 | for i686: passed: 6,290; failed: 29; error: 11
|
---|
296 | 18.0.1.1+2:
|
---|
297 | for x86_64: passed: 6,323; failed: 53; error: 14
|
---|
298 | for i686: passed: 6,290; failed: 29; error: 11
|
---|
299 | 18.0.2+8:
|
---|
300 | for x86_64: passed: 6,329; failed: 50; error: 14
|
---|
301 | for i686: passed: 6,289; failed: 31; error: 13
|
---|
302 | 19.0.1+10:
|
---|
303 | for x86_64: passed: 6,423; failed: 58; error: 15
|
---|
304 | for i686: passed: 6,376; failed: 31; error: 12
|
---|
305 | 19.0.2+7:
|
---|
306 | for x86_64: passed: 6,426; failed: 61; error: 14
|
---|
307 | for i686: passed: 6,377; failed: 34; error: 11
|
---|
308 | 20.0.1+9:
|
---|
309 | for x86_64: passed: 6,515; failed: 65; error: 13
|
---|
310 | for i686: passed: 6,520; failed: 60; error: 13
|
---|
311 | -->
|
---|
312 |
|
---|
313 | <para>
|
---|
314 | Install the package with the following commands as the
|
---|
315 | <systemitem class="username">root</systemitem> user:
|
---|
316 | </para>
|
---|
317 |
|
---|
318 | <screen role="root"><userinput>install -vdm755 /opt/jdk-&openjdk-version;+&openjdk-build; &&
|
---|
319 | cp -Rv build/*/images/jdk/* /opt/jdk-&openjdk-version;+&openjdk-build; &&
|
---|
320 | chown -R root:root /opt/jdk-&openjdk-version;+&openjdk-build; &&
|
---|
321 | for s in 16 24 32 48; do
|
---|
322 | install -vDm644 src/java.desktop/unix/classes/sun/awt/X11/java-icon${s}.png \
|
---|
323 | /usr/share/icons/hicolor/${s}x${s}/apps/java.png
|
---|
324 | done</userinput></screen>
|
---|
325 |
|
---|
326 | <note>
|
---|
327 | <para>
|
---|
328 | If you only wish to install the Java Runtime Environment, you can
|
---|
329 | substitute <filename>build/*/images/jre</filename> in the above
|
---|
330 | <command>cp</command> command.
|
---|
331 | </para>
|
---|
332 | </note>
|
---|
333 |
|
---|
334 | <para>
|
---|
335 | There are now two <application>OpenJDK</application> SDKs installed
|
---|
336 | in <filename class="directory">/opt</filename>. You should decide on
|
---|
337 | which one you would like to use as the default. Normally, you would opt
|
---|
338 | for the just installed <application>OpenJDK</application>. If so, do
|
---|
339 | the following as the <systemitem class="username">root</systemitem>
|
---|
340 | user:
|
---|
341 | </para>
|
---|
342 |
|
---|
343 | <screen role="root"><userinput>ln -v -nsf jdk-&openjdk-version;+&openjdk-build; /opt/jdk</userinput></screen>
|
---|
344 |
|
---|
345 | <para>
|
---|
346 | If desired, you can create .desktop files to add entries
|
---|
347 | in the menu for <command>java</command>
|
---|
348 | and <command>jconsole</command>. The needed icons have already been
|
---|
349 | installed. As the <systemitem class="username">root</systemitem> user:
|
---|
350 | </para>
|
---|
351 |
|
---|
352 | <screen role="root"><userinput>mkdir -pv /usr/share/applications &&
|
---|
353 |
|
---|
354 | cat > /usr/share/applications/openjdk-java.desktop << "EOF" &&
|
---|
355 | <literal>[Desktop Entry]
|
---|
356 | Name=OpenJDK Java &openjdk-version; Runtime
|
---|
357 | Comment=OpenJDK Java &openjdk-version; Runtime
|
---|
358 | Exec=/opt/jdk/bin/java -jar
|
---|
359 | Terminal=false
|
---|
360 | Type=Application
|
---|
361 | Icon=java
|
---|
362 | MimeType=application/x-java-archive;application/java-archive;application/x-jar;
|
---|
363 | NoDisplay=true</literal>
|
---|
364 | EOF
|
---|
365 | cat > /usr/share/applications/openjdk-jconsole.desktop << "EOF"
|
---|
366 | <literal>[Desktop Entry]
|
---|
367 | Name=OpenJDK Java &openjdk-version; Console
|
---|
368 | Comment=OpenJDK Java &openjdk-version; Console
|
---|
369 | Keywords=java;console;monitoring
|
---|
370 | Exec=/opt/jdk/bin/jconsole
|
---|
371 | Terminal=false
|
---|
372 | Type=Application
|
---|
373 | Icon=java
|
---|
374 | Categories=Application;System;</literal>
|
---|
375 | EOF</userinput></screen>
|
---|
376 |
|
---|
377 | </sect2>
|
---|
378 |
|
---|
379 | <sect2 role="commands">
|
---|
380 | <title>Command Explanations</title>
|
---|
381 |
|
---|
382 | <para>
|
---|
383 | <command>bash configure...</command>: the top level
|
---|
384 | <filename>configure</filename> is a wrapper around the autotools one.
|
---|
385 | It is not executable and must be run through <command>bash</command>.
|
---|
386 | </para>
|
---|
387 | <!-- Not needed in openjdk-15
|
---|
388 | <para>
|
---|
389 | <parameter>- -with-extra-cflags=-fcommon</parameter>: Allows building
|
---|
390 | with GCC 10.
|
---|
391 | </para>
|
---|
392 | -->
|
---|
393 | <para>
|
---|
394 | <parameter>--enable-unlimited-crypto</parameter>: Because of limitations
|
---|
395 | on the usage of cryptography in some countries, there is the possibility
|
---|
396 | to limit the size of encryption keys and the use of some algorithms in a
|
---|
397 | policy file. This switch allows to ship a policy file with no
|
---|
398 | restriction. It is the responsibility of the user to ensure proper
|
---|
399 | adherence to the law.
|
---|
400 | </para>
|
---|
401 |
|
---|
402 | <para>
|
---|
403 | <parameter>--disable-warnings-as-errors</parameter>: This switch disables
|
---|
404 | use of <envar>-Werror</envar> in the build.
|
---|
405 | </para>
|
---|
406 |
|
---|
407 | <para>
|
---|
408 | <parameter>--with-stdc++lib=dynamic</parameter>: This switch forces the
|
---|
409 | build system to link to <filename>libstdc++.so</filename> (dynamic)
|
---|
410 | instead of <filename>libstdc++.a</filename> (static).
|
---|
411 | </para>
|
---|
412 |
|
---|
413 | <para>
|
---|
414 | <option>--with-jobs=<replaceable><X></replaceable></option>:
|
---|
415 | The <parameter>-j</parameter> passed to make does not work with make as
|
---|
416 | invoked here. By default, the build system will use the number of
|
---|
417 | CPUs - 1.
|
---|
418 | </para>
|
---|
419 |
|
---|
420 | <para>
|
---|
421 | <parameter>--with-jtreg=$PWD/jtreg</parameter>: This switch tells
|
---|
422 | configure where to find jtreg. Omit if you have not downloaded the
|
---|
423 | optional test suite.
|
---|
424 | </para>
|
---|
425 |
|
---|
426 | <para>
|
---|
427 | <parameter>--with-{giflib,lcms,libjpeg,libpng,zlib}=system</parameter>:
|
---|
428 | These switches force the build system to use the system libraries instead
|
---|
429 | of the bundled versions.
|
---|
430 | </para>
|
---|
431 |
|
---|
432 | <para>
|
---|
433 | <parameter>--with-version-build</parameter>: Currently, the build
|
---|
434 | system does not include the build number in the version string. It has
|
---|
435 | to be specified here.
|
---|
436 | </para>
|
---|
437 |
|
---|
438 | <para>
|
---|
439 | <parameter>--with-version-pre</parameter>: This switch allows you to
|
---|
440 | prefix the version string with a custom string.
|
---|
441 | </para>
|
---|
442 |
|
---|
443 | <para>
|
---|
444 | <parameter>--with-version-opt</parameter>: This switch allows you to add
|
---|
445 | an optional build description to the version string.
|
---|
446 | </para>
|
---|
447 |
|
---|
448 | <para>
|
---|
449 | <parameter>--with-cacerts-file=/etc/pki/tls/java/cacerts</parameter>:
|
---|
450 | Specifies where to find a <filename>cacerts</filename> file,
|
---|
451 | <filename>/etc/pki/tls/java/</filename> on a BLFS system. Otherwise, an
|
---|
452 | empty one is created. You can use the
|
---|
453 | <command>/usr/sbin/make-ca --force</command> command to generate it, once
|
---|
454 | you have installed the Java binaries.
|
---|
455 | </para>
|
---|
456 |
|
---|
457 | <para>
|
---|
458 | <option>--with-boot-jdk</option>: This switch provides the
|
---|
459 | location of the temporary <application>JDK</application>. It is normally
|
---|
460 | not needed if <command>java</command> is found in the <envar>PATH</envar>.
|
---|
461 | </para>
|
---|
462 | <!-- Seems to have disappeared
|
---|
463 | <para>
|
---|
464 | <command>find ... -iname '*.diz' -delete</command>: This command
|
---|
465 | removes redundant files.
|
---|
466 | </para>
|
---|
467 | -->
|
---|
468 | </sect2>
|
---|
469 |
|
---|
470 | <sect2 role="configuration"
|
---|
471 | id="openjdk-config"
|
---|
472 | xreflabel="Configuring OpenJDK">
|
---|
473 | <title>Configuring OpenJDK</title>
|
---|
474 |
|
---|
475 | <sect3>
|
---|
476 | <title>Configuration Information</title>
|
---|
477 |
|
---|
478 | <para>
|
---|
479 | Normally, the JAVA environment has been configured after installing
|
---|
480 | the binary version, and can be used with the just built package as well.
|
---|
481 | Review <xref linkend="ojdk-conf"/> in case you want to modify
|
---|
482 | something.
|
---|
483 | </para>
|
---|
484 |
|
---|
485 | <para>
|
---|
486 | To test if the man pages are correctly installed, issue
|
---|
487 | <command>source /etc/profile</command> and <command>man java</command>
|
---|
488 | to display the respective man page.
|
---|
489 | </para>
|
---|
490 |
|
---|
491 | </sect3>
|
---|
492 |
|
---|
493 | <sect3>
|
---|
494 | <title>
|
---|
495 | Setting up the JRE Certificate Authority Certificates (cacerts) file
|
---|
496 | </title>
|
---|
497 |
|
---|
498 | <para>
|
---|
499 | If you have run the instructions on the <xref linkend="make-ca"/> page,
|
---|
500 | you only need to create a symlink in the default location for the
|
---|
501 | <filename>cacerts</filename> file. As user <systemitem
|
---|
502 | class="username">root</systemitem>:
|
---|
503 | </para>
|
---|
504 |
|
---|
505 | <screen role="root"><userinput>ln -sfv /etc/pki/tls/java/cacerts /opt/jdk/lib/security/cacerts</userinput></screen>
|
---|
506 |
|
---|
507 | <para>
|
---|
508 | To check the installation, issue:
|
---|
509 | </para>
|
---|
510 |
|
---|
511 | <screen role="root"><userinput>cd /opt/jdk
|
---|
512 | bin/keytool -list -cacerts</userinput></screen>
|
---|
513 |
|
---|
514 | <para>
|
---|
515 | At the prompt <computeroutput>Enter keystore password:</computeroutput>,
|
---|
516 | enter <userinput>changeit</userinput> (the default) or just press the
|
---|
517 | <quote>Enter</quote> key. If the <filename>cacerts</filename> file was
|
---|
518 | installed correctly, you will see a list of the certificates with
|
---|
519 | related information for each one. If not, you need to reinstall them.
|
---|
520 | </para>
|
---|
521 |
|
---|
522 | </sect3>
|
---|
523 |
|
---|
524 | </sect2>
|
---|
525 |
|
---|
526 | <sect2 role="content">
|
---|
527 | <title>Contents</title>
|
---|
528 |
|
---|
529 | <segmentedlist>
|
---|
530 | <segtitle>Installed Programs</segtitle>
|
---|
531 | <segtitle>Installed Libraries</segtitle>
|
---|
532 | <segtitle>Installed Directory</segtitle>
|
---|
533 |
|
---|
534 | <seglistitem>
|
---|
535 | <seg>jar, jarsigner, java, javac, javadoc, javap, jcmd,
|
---|
536 | jconsole, jdb, jdeprscan, jdeps, jfr, jhsdb, jimage, jinfo,
|
---|
537 | jlink, jmap, jmod, jpackage, jps, jrunscript, jshell, jstack,
|
---|
538 | jstat, jstatd, jwebserver, keytool, rmiregistry, and serialver</seg>
|
---|
539 | <seg>/opt/jdk-&openjdk-version;/lib/*</seg>
|
---|
540 | <seg>/opt/jdk-&openjdk-version;</seg>
|
---|
541 | </seglistitem>
|
---|
542 | </segmentedlist>
|
---|
543 |
|
---|
544 | <variablelist>
|
---|
545 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
546 | <?dbfo list-presentation="list"?>
|
---|
547 | <?dbhtml list-presentation="table"?>
|
---|
548 |
|
---|
549 | <!-- Not seen in 17.0.1
|
---|
550 | <varlistentry id="jaotc">
|
---|
551 | <term><command>jaotc</command></term>
|
---|
552 | <listitem>
|
---|
553 | <para>
|
---|
554 | is an <quote>ahead-of-time</quote> java class compiler
|
---|
555 | </para>
|
---|
556 | <indexterm zone="openjdk jaotc">
|
---|
557 | <primary sortas="b-jaotc">jaotc</primary>
|
---|
558 | </indexterm>
|
---|
559 | </listitem>
|
---|
560 | </varlistentry>
|
---|
561 | -->
|
---|
562 |
|
---|
563 | <varlistentry id="jar">
|
---|
564 | <term><command>jar</command></term>
|
---|
565 | <listitem>
|
---|
566 | <para>
|
---|
567 | combines multiple files into a single jar archive
|
---|
568 | </para>
|
---|
569 | <indexterm zone="openjdk jar">
|
---|
570 | <primary sortas="b-jar">jar</primary>
|
---|
571 | </indexterm>
|
---|
572 | </listitem>
|
---|
573 | </varlistentry>
|
---|
574 |
|
---|
575 | <varlistentry id="jarsigner">
|
---|
576 | <term><command>jarsigner</command></term>
|
---|
577 | <listitem>
|
---|
578 | <para>
|
---|
579 | signs jar files and verifies the signatures and integrity
|
---|
580 | of a signed jar file
|
---|
581 | </para>
|
---|
582 | <indexterm zone="openjdk jarsigner">
|
---|
583 | <primary sortas="b-jarsigner">jarsigner</primary>
|
---|
584 | </indexterm>
|
---|
585 | </listitem>
|
---|
586 | </varlistentry>
|
---|
587 |
|
---|
588 | <varlistentry id="java-prog">
|
---|
589 | <term><command>java</command></term>
|
---|
590 | <listitem>
|
---|
591 | <para>
|
---|
592 | launches a Java application by starting a Java runtime
|
---|
593 | environment, loading a specified class and invoking its main
|
---|
594 | method
|
---|
595 | </para>
|
---|
596 | <indexterm zone="openjdk java-prog">
|
---|
597 | <primary sortas="b-java-prog">java</primary>
|
---|
598 | </indexterm>
|
---|
599 | </listitem>
|
---|
600 | </varlistentry>
|
---|
601 |
|
---|
602 | <varlistentry id="javac">
|
---|
603 | <term><command>javac</command></term>
|
---|
604 | <listitem>
|
---|
605 | <para>
|
---|
606 | reads class and interface definitions, written in the
|
---|
607 | Java programming language, and compiles them into bytecode
|
---|
608 | class files
|
---|
609 | </para>
|
---|
610 | <indexterm zone="openjdk javac">
|
---|
611 | <primary sortas="b-javac">javac</primary>
|
---|
612 | </indexterm>
|
---|
613 | </listitem>
|
---|
614 | </varlistentry>
|
---|
615 |
|
---|
616 | <varlistentry id="javadoc">
|
---|
617 | <term><command>javadoc</command></term>
|
---|
618 | <listitem>
|
---|
619 | <para>
|
---|
620 | parses the declarations and documentation comments in a
|
---|
621 | set of Java source files and produces a corresponding set of
|
---|
622 | HTML pages describing the classes, interfaces, constructors,
|
---|
623 | methods, and fields
|
---|
624 | </para>
|
---|
625 | <indexterm zone="openjdk javadoc">
|
---|
626 | <primary sortas="b-javadoc">javadoc</primary>
|
---|
627 | </indexterm>
|
---|
628 | </listitem>
|
---|
629 | </varlistentry>
|
---|
630 |
|
---|
631 | <varlistentry id="javap">
|
---|
632 | <term><command>javap</command></term>
|
---|
633 | <listitem>
|
---|
634 | <para>
|
---|
635 | disassembles a Java class file
|
---|
636 | </para>
|
---|
637 | <indexterm zone="openjdk javap">
|
---|
638 | <primary sortas="b-javap">javap</primary>
|
---|
639 | </indexterm>
|
---|
640 | </listitem>
|
---|
641 | </varlistentry>
|
---|
642 |
|
---|
643 | <varlistentry id="jcmd">
|
---|
644 | <term><command>jcmd</command></term>
|
---|
645 | <listitem>
|
---|
646 | <para>
|
---|
647 | is a utility to send diagnostic command requests to a running
|
---|
648 | Java Virtual Machine
|
---|
649 | </para>
|
---|
650 | <indexterm zone="openjdk jcmd">
|
---|
651 | <primary sortas="b-jcmd">jcmd</primary>
|
---|
652 | </indexterm>
|
---|
653 | </listitem>
|
---|
654 | </varlistentry>
|
---|
655 |
|
---|
656 | <varlistentry id="jconsole">
|
---|
657 | <term><command>jconsole</command></term>
|
---|
658 | <listitem>
|
---|
659 | <para>
|
---|
660 | is a graphical console tool to monitor and manage both
|
---|
661 | local and remote Java applications and virtual machines
|
---|
662 | </para>
|
---|
663 | <indexterm zone="openjdk jconsole">
|
---|
664 | <primary sortas="b-jconsole">jconsole</primary>
|
---|
665 | </indexterm>
|
---|
666 | </listitem>
|
---|
667 | </varlistentry>
|
---|
668 |
|
---|
669 | <varlistentry id="jdb">
|
---|
670 | <term><command>jdb</command></term>
|
---|
671 | <listitem>
|
---|
672 | <para>
|
---|
673 | is a simple command-line debugger for Java classes
|
---|
674 | </para>
|
---|
675 | <indexterm zone="openjdk jdb">
|
---|
676 | <primary sortas="b-jdb">jdb</primary>
|
---|
677 | </indexterm>
|
---|
678 | </listitem>
|
---|
679 | </varlistentry>
|
---|
680 |
|
---|
681 | <varlistentry id="jdeprscan">
|
---|
682 | <term><command>jdeprscan</command></term>
|
---|
683 | <listitem>
|
---|
684 | <para>
|
---|
685 | scans class or jar files for uses of deprecated API elements
|
---|
686 | </para>
|
---|
687 | <indexterm zone="openjdk jdeprscan">
|
---|
688 | <primary sortas="b-jdeprscan">jdeprscan</primary>
|
---|
689 | </indexterm>
|
---|
690 | </listitem>
|
---|
691 | </varlistentry>
|
---|
692 |
|
---|
693 | <varlistentry id="jdeps">
|
---|
694 | <term><command>jdeps</command></term>
|
---|
695 | <listitem>
|
---|
696 | <para>
|
---|
697 | shows the package-level or class-level dependencies of
|
---|
698 | Java class files
|
---|
699 | </para>
|
---|
700 | <indexterm zone="openjdk jdeps">
|
---|
701 | <primary sortas="b-jdeps">jdeps</primary>
|
---|
702 | </indexterm>
|
---|
703 | </listitem>
|
---|
704 | </varlistentry>
|
---|
705 |
|
---|
706 | <varlistentry id="jfr">
|
---|
707 | <term><command>jfr</command></term>
|
---|
708 | <listitem>
|
---|
709 | <para>
|
---|
710 | is a tool for working with <quote>Flight Recorder</quote> files
|
---|
711 | </para>
|
---|
712 | <indexterm zone="openjdk jfr">
|
---|
713 | <primary sortas="b-jfr">jfr</primary>
|
---|
714 | </indexterm>
|
---|
715 | </listitem>
|
---|
716 | </varlistentry>
|
---|
717 |
|
---|
718 | <varlistentry id="jhsdb">
|
---|
719 | <term><command>jhsdb</command></term>
|
---|
720 | <listitem>
|
---|
721 | <para>
|
---|
722 | is a tool to analyze the content of a core dump from a
|
---|
723 | crashed Java Virtual Machine (JVM)
|
---|
724 | </para>
|
---|
725 | <indexterm zone="openjdk jhsdb">
|
---|
726 | <primary sortas="b-jhsdb">jhsdb</primary>
|
---|
727 | </indexterm>
|
---|
728 | </listitem>
|
---|
729 | </varlistentry>
|
---|
730 |
|
---|
731 | <varlistentry id="jimage">
|
---|
732 | <term><command>jimage</command></term>
|
---|
733 | <listitem>
|
---|
734 | <para>
|
---|
735 | is used to list, extract, verify, or get information about
|
---|
736 | modules in <emphasis>jimage</emphasis> format
|
---|
737 | </para>
|
---|
738 | <indexterm zone="openjdk jimage">
|
---|
739 | <primary sortas="b-jimage">jimage</primary>
|
---|
740 | </indexterm>
|
---|
741 | </listitem>
|
---|
742 | </varlistentry>
|
---|
743 |
|
---|
744 | <varlistentry id="jinfo">
|
---|
745 | <term><command>jinfo</command></term>
|
---|
746 | <listitem>
|
---|
747 | <para>
|
---|
748 | prints Java configuration information for a given Java
|
---|
749 | process, core file, or a remote debug server
|
---|
750 | </para>
|
---|
751 | <indexterm zone="openjdk jinfo">
|
---|
752 | <primary sortas="b-jinfo">jinfo</primary>
|
---|
753 | </indexterm>
|
---|
754 | </listitem>
|
---|
755 | </varlistentry>
|
---|
756 | <!--
|
---|
757 | <varlistentry id="jjs">
|
---|
758 | <term><command>jjs</command></term>
|
---|
759 | <listitem>
|
---|
760 | <para>
|
---|
761 | is a command-line tool used to invoke the Nashorn engine. It
|
---|
762 | can be used to interpret one or several script files, or to run
|
---|
763 | an interactive shell.
|
---|
764 | </para>
|
---|
765 | <indexterm zone="openjdk jjs">
|
---|
766 | <primary sortas="b-jjs">jjs</primary>
|
---|
767 | </indexterm>
|
---|
768 | </listitem>
|
---|
769 | </varlistentry>
|
---|
770 | -->
|
---|
771 | <varlistentry id="jlink">
|
---|
772 | <term><command>jlink</command></term>
|
---|
773 | <listitem>
|
---|
774 | <para>
|
---|
775 | is used to assemble and optimize a set of modules and their
|
---|
776 | dependencies into a custom runtime image
|
---|
777 | </para>
|
---|
778 | <indexterm zone="openjdk jlink">
|
---|
779 | <primary sortas="b-jlink">jlink</primary>
|
---|
780 | </indexterm>
|
---|
781 | </listitem>
|
---|
782 | </varlistentry>
|
---|
783 |
|
---|
784 | <varlistentry id="jmap">
|
---|
785 | <term><command>jmap</command></term>
|
---|
786 | <listitem>
|
---|
787 | <para>
|
---|
788 | prints shared object memory maps or heap memory details
|
---|
789 | of a given process, core file, or a remote debug server
|
---|
790 | </para>
|
---|
791 | <indexterm zone="openjdk jmap">
|
---|
792 | <primary sortas="b-jmap">jmap</primary>
|
---|
793 | </indexterm>
|
---|
794 | </listitem>
|
---|
795 | </varlistentry>
|
---|
796 |
|
---|
797 | <varlistentry id="jmod">
|
---|
798 | <term><command>jmod</command></term>
|
---|
799 | <listitem>
|
---|
800 | <para>
|
---|
801 | creates JMOD files and lists the content of existing JMOD files
|
---|
802 | </para>
|
---|
803 | <indexterm zone="openjdk jmod">
|
---|
804 | <primary sortas="b-jmod">jmod</primary>
|
---|
805 | </indexterm>
|
---|
806 | </listitem>
|
---|
807 | </varlistentry>
|
---|
808 |
|
---|
809 | <varlistentry id="jpackage">
|
---|
810 | <term><command>jpackage</command></term>
|
---|
811 | <listitem>
|
---|
812 | <para>
|
---|
813 | generates java application packages and images
|
---|
814 | </para>
|
---|
815 | <indexterm zone="openjdk jpackage">
|
---|
816 | <primary sortas="b-jpackage">jpackage</primary>
|
---|
817 | </indexterm>
|
---|
818 | </listitem>
|
---|
819 | </varlistentry>
|
---|
820 |
|
---|
821 | <varlistentry id="jps">
|
---|
822 | <term><command>jps</command></term>
|
---|
823 | <listitem>
|
---|
824 | <para>
|
---|
825 | lists the instrumented JVMs on the target system
|
---|
826 | </para>
|
---|
827 | <indexterm zone="openjdk jps">
|
---|
828 | <primary sortas="b-jps">jps</primary>
|
---|
829 | </indexterm>
|
---|
830 | </listitem>
|
---|
831 | </varlistentry>
|
---|
832 |
|
---|
833 | <varlistentry id="jrunscript">
|
---|
834 | <term><command>jrunscript</command></term>
|
---|
835 | <listitem>
|
---|
836 | <para>
|
---|
837 | is a command line script shell
|
---|
838 | </para>
|
---|
839 | <indexterm zone="openjdk jrunscript">
|
---|
840 | <primary sortas="b-jrunscript">jrunscript</primary>
|
---|
841 | </indexterm>
|
---|
842 | </listitem>
|
---|
843 | </varlistentry>
|
---|
844 |
|
---|
845 | <varlistentry id="jshell">
|
---|
846 | <term><command>jshell</command></term>
|
---|
847 | <listitem>
|
---|
848 | <para>
|
---|
849 | is an interactive tool for learning the Java programming
|
---|
850 | language and prototyping Java code
|
---|
851 | </para>
|
---|
852 | <indexterm zone="openjdk jshell">
|
---|
853 | <primary sortas="b-jshell">jshell</primary>
|
---|
854 | </indexterm>
|
---|
855 | </listitem>
|
---|
856 | </varlistentry>
|
---|
857 |
|
---|
858 | <varlistentry id="jstack">
|
---|
859 | <term><command>jstack</command></term>
|
---|
860 | <listitem>
|
---|
861 | <para>
|
---|
862 | prints Java stack traces of Java threads for a given
|
---|
863 | Java process, core file, or a remote debug server
|
---|
864 | </para>
|
---|
865 | <indexterm zone="openjdk jstack">
|
---|
866 | <primary sortas="b-jstack">jstack</primary>
|
---|
867 | </indexterm>
|
---|
868 | </listitem>
|
---|
869 | </varlistentry>
|
---|
870 |
|
---|
871 | <varlistentry id="jstat">
|
---|
872 | <term><command>jstat</command></term>
|
---|
873 | <listitem>
|
---|
874 | <para>
|
---|
875 | displays performance statistics for an instrumented JVM
|
---|
876 | </para>
|
---|
877 | <indexterm zone="openjdk jstat">
|
---|
878 | <primary sortas="b-jstat">jstat</primary>
|
---|
879 | </indexterm>
|
---|
880 | </listitem>
|
---|
881 | </varlistentry>
|
---|
882 |
|
---|
883 | <varlistentry id="jstatd">
|
---|
884 | <term><command>jstatd</command></term>
|
---|
885 | <listitem>
|
---|
886 | <para>
|
---|
887 | is an RMI server application that monitors for the creation
|
---|
888 | and termination of instrumented JVMs
|
---|
889 | </para>
|
---|
890 | <indexterm zone="openjdk jstatd">
|
---|
891 | <primary sortas="b-jstatd">jstatd</primary>
|
---|
892 | </indexterm>
|
---|
893 | </listitem>
|
---|
894 | </varlistentry>
|
---|
895 |
|
---|
896 | <varlistentry id="jwebserver">
|
---|
897 | <term><command>jwebserver</command></term>
|
---|
898 | <listitem>
|
---|
899 | <para>
|
---|
900 | provides a minimal HTTP server, designed to be used for
|
---|
901 | prototyping, testing, and debugging
|
---|
902 | </para>
|
---|
903 | <indexterm zone="openjdk jwebserver">
|
---|
904 | <primary sortas="b-jwebserver">jwebserver</primary>
|
---|
905 | </indexterm>
|
---|
906 | </listitem>
|
---|
907 | </varlistentry>
|
---|
908 |
|
---|
909 | <varlistentry id="keytool">
|
---|
910 | <term><command>keytool</command></term>
|
---|
911 | <listitem>
|
---|
912 | <para>
|
---|
913 | is a key and certificate management utility
|
---|
914 | </para>
|
---|
915 | <indexterm zone="openjdk keytool">
|
---|
916 | <primary sortas="b-keytool">keytool</primary>
|
---|
917 | </indexterm>
|
---|
918 | </listitem>
|
---|
919 | </varlistentry>
|
---|
920 | <!--
|
---|
921 | <varlistentry id="pack200">
|
---|
922 | <term><command>pack200</command></term>
|
---|
923 | <listitem>
|
---|
924 | <para>
|
---|
925 | is a Java application that transforms a jar file into a
|
---|
926 | compressed pack200 file using the Java gzip compressor.
|
---|
927 | </para>
|
---|
928 | <indexterm zone="openjdk pack200">
|
---|
929 | <primary sortas="b-pack200">pack200</primary>
|
---|
930 | </indexterm>
|
---|
931 | </listitem>
|
---|
932 | </varlistentry>
|
---|
933 |
|
---|
934 | <varlistentry id="rmic">
|
---|
935 | <term><command>rmic</command></term>
|
---|
936 | <listitem>
|
---|
937 | <para>
|
---|
938 | generates stub and skeleton class files for remote objects
|
---|
939 | from the names of compiled Java classes that contain remote
|
---|
940 | object implementations.
|
---|
941 | </para>
|
---|
942 | <indexterm zone="openjdk rmic">
|
---|
943 | <primary sortas="b-rmic">rmic</primary>
|
---|
944 | </indexterm>
|
---|
945 | </listitem>
|
---|
946 | </varlistentry>
|
---|
947 | -->
|
---|
948 | <!-- Not seen in 17.0.1
|
---|
949 | <varlistentry id="rmid">
|
---|
950 | <term><command>rmid</command></term>
|
---|
951 | <listitem>
|
---|
952 | <para>
|
---|
953 | starts the activation system daemon
|
---|
954 | </para>
|
---|
955 | <indexterm zone="openjdk rmid">
|
---|
956 | <primary sortas="b-rmid">rmid</primary>
|
---|
957 | </indexterm>
|
---|
958 | </listitem>
|
---|
959 | </varlistentry>
|
---|
960 | -->
|
---|
961 |
|
---|
962 | <varlistentry id="rmiregistry">
|
---|
963 | <term><command>rmiregistry</command></term>
|
---|
964 | <listitem>
|
---|
965 | <para>
|
---|
966 | creates and starts a remote object registry on the specified
|
---|
967 | port on the current host
|
---|
968 | </para>
|
---|
969 | <indexterm zone="openjdk rmiregistry">
|
---|
970 | <primary sortas="b-rmiregistry">rmiregistry</primary>
|
---|
971 | </indexterm>
|
---|
972 | </listitem>
|
---|
973 | </varlistentry>
|
---|
974 |
|
---|
975 | <varlistentry id="serialver">
|
---|
976 | <term><command>serialver</command></term>
|
---|
977 | <listitem>
|
---|
978 | <para>
|
---|
979 | returns the serialVersionUID for one or more classes in a
|
---|
980 | form suitable for copying into an evolving class
|
---|
981 | </para>
|
---|
982 | <indexterm zone="openjdk serialver">
|
---|
983 | <primary sortas="b-serialver">serialver</primary>
|
---|
984 | </indexterm>
|
---|
985 | </listitem>
|
---|
986 | </varlistentry>
|
---|
987 | <!--
|
---|
988 | <varlistentry id="unpack200">
|
---|
989 | <term><command>unpack200</command></term>
|
---|
990 | <listitem>
|
---|
991 | <para>
|
---|
992 | is a native implementation that transforms a packed file
|
---|
993 | produced by <application>pack200</application> into a jar
|
---|
994 | file.
|
---|
995 | </para>
|
---|
996 | <indexterm zone="openjdk unpack200">
|
---|
997 | <primary sortas="b-unpack200">unpack200</primary>
|
---|
998 | </indexterm>
|
---|
999 | </listitem>
|
---|
1000 | </varlistentry>
|
---|
1001 | -->
|
---|
1002 | </variablelist>
|
---|
1003 |
|
---|
1004 | </sect2>
|
---|
1005 |
|
---|
1006 | </sect1>
|
---|