source: general/prog/java.xml@ b65c42a

perl-modules
Last change on this file since b65c42a was d2cb534, checked in by DJ Lucas <dj@…>, 6 years ago

Update to OpenJDK-10.0.2. Fixes #10959.

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

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