source: general/prog/java.xml@ c599277

10.0 10.1 11.0 8.4 9.0 9.1 ken/refactor-virt lazarus qt5new trunk xry111/git-date xry111/git-date-for-trunk xry111/git-date-test
Last change on this file since c599277 was c599277, checked in by Douglas R. Reno <renodr@…>, 3 years ago

Adapt Libreoffice to changes in JDK11
Minor stylistic changes to subversion
OpenJDK: Add comment about test suite failures
Java: Regenerate i686 binary for +9

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

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