source: general/prog/java.xml@ 7c6b211f

11.2 11.3 12.0 12.1 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk xry111/llvm18 xry111/soup3 xry111/xf86-video-removal
Last change on this file since 7c6b211f was 7c6b211f, checked in by Douglas R. Reno <renodr@…>, 21 months ago

Update to OpenJDK-18.0.2. The i686 binary will come later today or
tomorrow.

  • Property mode set to 100644
File size: 7.0 KB
Line 
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<!-- Maintainer: before making the tarball, remove all .debuginfo files from
8 the directory: this saves more than 70 MB. -->
9 <!ENTITY anduin-download "&sources-anduin-http;/OpenJDK/OpenJDK-&openjdk-version;">
10<!--<!ENTITY openjdk-download-binary-x86 "&sources-anduin-http;/OpenJDK/OpenJDK-&openjdk-version;/OpenJDK-&openjdk-version;+&openjdk-build;-i686-bin.tar.xz">-->
11 <!-- The i686 binary will come today or tomorrow. 8/12/22 or 8/13/22. -->
12 <!ENTITY openjdk-download-binary-x86 "&sources-anduin-http;/OpenJDK/OpenJDK-18.0.1.1/OpenJDK-18.0.1.1+2-i686-bin.tar.xz">
13 <!ENTITY openjdk-bin-md5sum-x86 "cdcbbd909fff6db24473f6a49f1e6dcb">
14 <!ENTITY openjdk-bin-size-x86 "154 MB">
15 <!ENTITY openjdk-bin-buildsize-x86 "295 MB">
16
17<!-- Not uploaded to anduin, since this file is now available under GNU GPLv2
18 licence.-->
19<!-- Reuploaded to anduin due to the complexity of the download URL, per Bruce's
20 request. - Doug -->
21 <!ENTITY openjdk-download-binary-x64 "&sources-anduin-http;/OpenJDK/OpenJDK-&openjdk-version;/OpenJDK-&openjdk-version;+&openjdk-build;-x86_64-bin.tar.xz">
22 <!ENTITY openjdk-bin-md5sum-x64 "89271dd2c7655c4c2b256f68abc4b732">
23 <!ENTITY openjdk-bin-size-x64 "160 MB">
24 <!ENTITY openjdk-bin-buildsize-x64 "320 MB">
25]>
26
27<sect1 id="java" xreflabel="Java-&openjdk-version;">
28 <?dbhtml filename="java.html"?>
29
30 <sect1info>
31 <date>$Date$</date>
32 </sect1info>
33
34 <title>Java-&openjdk-version;</title>
35
36 <indexterm zone="java">
37 <primary sortas="a-java">JDK Binary</primary>
38 </indexterm>
39
40
41 <sect2>
42 <title>About Java</title>
43 <para>
44 Java is different from most of the packages in LFS and BLFS. It
45 is a programming language that works with files of bytecode to obtain
46 instructions and executes them in a Java Virtual Machine (JVM). An
47 introductory java program looks like:
48 </para>
49
50<screen><literal>public class HelloWorld
51{
52 public static void main(String[] args)
53 {
54 System.out.println("Hello, World");
55 }
56}</literal></screen>
57
58 <para>
59 This program is saved as <filename>HelloWorld.java</filename>. The
60 file name, <emphasis>HelloWorld</emphasis>, must match the class name.
61 It is then converted into byte code with
62 <command>javac HelloWorld.java</command>. The output file is
63 <filename>HelloWorld.class</filename>. The program is executed with
64 <command>java HelloWorld</command>. This creates a JVM and runs the
65 code. The 'class' extension must not be specified.
66 </para>
67
68 <para>
69 Several class files can be combined into one file with the
70 <command>jar</command> command. This is similar to the standard
71 <command>tar</command> command. For instance, the command
72 <command>jar cf myjar.jar *.class</command> will combine all class files
73 in a directory into one jar file. These act as library files.
74 </para>
75
76 <para>
77 The JVM can search for and use classes in jar files automatically.
78 It uses the <envar>CLASSPATH</envar> environment variable to search for
79 jar files. This is a standard list of colon-separated directory names
80 similar to the <envar>PATH</envar> environment variable.
81 </para>
82
83 </sect2>
84
85 <sect2 id="java-bin" xreflabel="Java Binary" role="package">
86 <title>Binary JDK Information</title>
87
88 <para>
89 Creating a JVM from source requires a set of circular dependencies.
90 The first thing that's needed is a set of programs called a Java
91 Development Kit (JDK). This set of programs includes
92 <command>java</command>, <command>javac</command>,
93 <command>jar</command>, and several others. It also includes several
94 base <emphasis>jar</emphasis> files.
95 </para>
96
97 <para>
98 To start, we set up a binary installation of the JDK created
99 by the BLFS editors. It is installed in the <filename>/opt</filename>
100 directory to allow for multiple installations, including a source based
101 version.
102 </para>
103
104 &lfs111_checked;
105
106 <bridgehead renderas="sect3">Binary Package Information</bridgehead>
107 <itemizedlist spacing="compact">
108 <listitem>
109 <para>
110 Binary download (x86): <ulink url="&openjdk-download-binary-x86;"/>
111 </para>
112 </listitem>
113 <listitem>
114 <para>
115 Download MD5 sum: &openjdk-bin-md5sum-x86;
116 </para>
117 </listitem>
118 <listitem>
119 <para>
120 Download size (binary): &openjdk-bin-size-x86;
121 </para>
122 </listitem>
123 <listitem>
124 <para>
125 Estimated disk space required: &openjdk-bin-buildsize-x86;
126 </para>
127 </listitem>
128 </itemizedlist>
129 <itemizedlist spacing="compact">
130 <listitem>
131 <para>
132 Binary download (x86_64): <ulink url="&openjdk-download-binary-x64;"/>
133 </para>
134 </listitem>
135 <listitem>
136 <para>
137 Download MD5 sum: &openjdk-bin-md5sum-x64;
138 </para>
139 </listitem>
140 <listitem>
141 <para>
142 Download size (binary): &openjdk-bin-size-x64;
143 </para>
144 </listitem>
145 <listitem>
146 <para>
147 Estimated disk space required: &openjdk-bin-buildsize-x64;
148 </para>
149 </listitem>
150 </itemizedlist>
151
152 <bridgehead renderas="sect3">Java Binary Runtime Dependencies</bridgehead>
153 <para role="required">
154 <xref role="runtime" linkend="alsa-lib"/>,
155 <xref role="runtime" linkend="cups"/>,
156 <xref role="runtime" linkend="giflib"/>, and
157 <xref role="runtime" linkend="xorg7-lib"/>
158 </para>
159
160 </sect2>
161
162 <sect2 role="installation">
163 <title>Installation of the Java BinaryJDK </title>
164<!--
165 <note>
166 <para>
167 The tarball
168 <emphasis>openjdk-&openjdk-version;_linux-x64_bin.tar.gz</emphasis> will
169 untar to the <emphasis>jdk-&openjdk-version;</emphasis> directory.
170 </para>
171 </note>
172-->
173 <para>
174 Begin by extracting the appropriate binary tarball for your
175 architecture and changing to the extracted directory. Install the binary
176 <application>OpenJDK</application> with the following commands as the
177 <systemitem class="username">root</systemitem> user:
178 </para>
179
180<screen role="root"><userinput>install -vdm755 /opt/OpenJDK-&openjdk-version;-bin &amp;&amp;
181mv -v * /opt/OpenJDK-&openjdk-version;-bin &amp;&amp;
182chown -R root:root /opt/OpenJDK-&openjdk-version;-bin</userinput></screen>
183
184 <para>
185 The binary version is now installed. You may create a symlink to that
186 version by issuing, as the <systemitem class="username">root</systemitem>
187 user:
188 </para>
189
190<screen role="root"><userinput>ln -sfn OpenJDK-&openjdk-version;-bin /opt/jdk</userinput></screen>
191
192 <para>
193 You may now proceed to <xref linkend="ojdk-conf"/>, where the
194 instructions assume that the above link exists.
195 </para>
196
197 </sect2>
198
199</sect1>
Note: See TracBrowser for help on using the repository browser.