source: general/prog/java.xml@ 50a6bd6

11.0 11.1 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 upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 50a6bd6 was 50a6bd6, checked in by Douglas R. Reno <renodr@…>, 3 years ago

A few tags and a minor tweak to Java to remove the version string,
preventing confusion.

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