source: general/prog/java.xml@ 45ab6c7

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 45ab6c7 was 45ab6c7, checked in by Xi Ruoyao <xry111@…>, 3 years ago

more SVN prop clean up

Remove "$LastChanged$" everywhere, and also some unused $Date$

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