source: general/prog/java.xml@ de33b2a

10.0 10.1 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 de33b2a was de33b2a, checked in by Pierre Labastie <pieere@…>, 4 years ago

Format general/prog

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

  • Property mode set to 100644
File size: 6.7 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<!-- 32-bit binary for JDK12 pending, will be done before 9.0 releases -->
10 <!ENTITY anduin-download "&sources-anduin-http;/OpenJDK/OpenJDK-&openjdk-version;">
11 <!ENTITY openjdk-download-binary-x86 "&sources-anduin-http;/OpenJDK/OpenJDK-11.0.2/OpenJDK-11.0.2+9-i686-bin.tar.xz">
12 <!ENTITY openjdk-bin-md5sum-x86 "2b917647040e9804e0f3ccd51f40394b">
13 <!ENTITY openjdk-bin-size-x86 "158 MB">
14 <!ENTITY openjdk-bin-buildsize-x86 "273 MB">
15
16<!-- Not uploaded to anduin, since this file is now available under GNU GPLv2
17 licence.-->
18<!-- I've crafted a binary in case the version is removed from Oracle after
19 BLFS 8.4 is released. -->
20 <!ENTITY openjdk-download-binary-x64 "https://download.java.net/java/GA/jdk12.0.2/e482c34c86bd4bf8b56c0b35558996b9/&openjdk-build;/GPL/openjdk-&openjdk-version;_linux-x64_bin.tar.gz">
21 <!ENTITY openjdk-bin-md5sum-x64 "f5da6f4dec81bdd2a096184ec1d69216">
22 <!ENTITY openjdk-bin-size-x64 "189 MB">
23 <!ENTITY openjdk-bin-buildsize-x64 "296 MB">
24]>
25
26<sect1 id="java" xreflabel="Java-&openjdk-version;">
27 <?dbhtml filename="java.html"?>
28
29 <sect1info>
30 <othername>$LastChangedBy$</othername>
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 byte codes to obtain
46 instructions and executes then 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 &lfs91_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 <para>
165 Begin by extracting the appropriate binary tarball for your
166 architecture and changing to the extracted directory. Install the binary
167 <application>OpenJDK</application> with the following commands as the
168 <systemitem class="username">root</systemitem> user:
169 </para>
170
171<screen role="root"><userinput>install -vdm755 /opt/OpenJDK-&openjdk-version;+&openjdk-build;-bin &amp;&amp;
172mv -v * /opt/OpenJDK-&openjdk-version;+&openjdk-build;-bin &amp;&amp;
173chown -R root:root /opt/OpenJDK-&openjdk-version;+&openjdk-build;-bin</userinput></screen>
174
175 <para>
176 The binary version is now installed. You may create a symlink to that
177 version by issuing, as the <systemitem class="username">root</systemitem>
178 user:
179 </para>
180
181<screen role="root"><userinput>ln -sfn OpenJDK-&openjdk-version;+&openjdk-build;-bin /opt/jdk</userinput></screen>
182
183 <para>
184 You may now proceed to <xref linkend="ojdk-conf"/>, where the
185 instructions assume that the above link exists.
186 </para>
187
188 </sect2>
189
190</sect1>
Note: See TracBrowser for help on using the repository browser.