Author: pierre
Date: Sat Mar 29 13:32:20 2014
New Revision: 12915

Log:
Really make JAva binary versioned

Modified:
   trunk/BOOK/general/prog/java.xml

Modified: trunk/BOOK/general/prog/java.xml
==============================================================================
--- trunk/BOOK/general/prog/java.xml    Sat Mar 29 10:57:15 2014        (r12914)
+++ trunk/BOOK/general/prog/java.xml    Sat Mar 29 13:32:20 2014        (r12915)
@@ -24,17 +24,19 @@
     <date>$Date$</date>
   </sect1info>
 
-  <title>About Java</title>
+  <title>Java-&openjdk-version;</title>
 
   <indexterm zone="java">
     <primary sortas="a-java">JDK Binary</primary>
   </indexterm>
 
 
-  <para>Java is different from most of the packages in LFS and BLFS.  It
-  is a programming language that works with files of byte codes to obtain
-  instructions and executes then in a Java Virtual Machine (JVM).  An 
-  introductory java program looks like:</para>
+  <sect2>
+    <title>About Java</title>
+    <para>Java is different from most of the packages in LFS and BLFS. It
+    is a programming language that works with files of byte codes to obtain
+    instructions and executes then in a Java Virtual Machine (JVM). An 
+    introductory java program looks like:</para>
 
 <screen><literal>public class HelloWorld 
 {
@@ -44,25 +46,26 @@
     }
 }</literal></screen>
 
-  <para>This program is saved as <filename>HelloWorld.java</filename>.  The 
file
-  name, <emphasis>HelloWorld</emphasis>, must match the class name.  It
-  is then converted into byte code with <command>javac 
HelloWorld.java</command>.
-  The output file is <filename>HelloWorld.class</filename>.  The program is 
-  executed with <command>java HelloWorld</command>.  This creates a JVM and 
-  runs the code.  The 'class' extension must not be specified.</para>
-
-  <para>Several class files can be combined into one file with the
-  <command>jar</command> command.  This is similar to the standard
-  <command>tar</command> command.  For instance, the command <command>jar cf 
myjar.jar
-  *.class</command> will combine all class files in a directory into one jar
-  file.  These act as library files.</para>
-
-  <para>The JVM can search for and use classes in jar files automatically.  It
-  uses the <envar>CLASSPATH</envar> environment variable to search for jar 
files.
-  This is a standard list of colon-separated directory names similar to
-  the <envar>PATH</envar> environment variable.</para>
+    <para>This program is saved as <filename>HelloWorld.java</filename>. The
+    file name, <emphasis>HelloWorld</emphasis>, must match the class name. It
+    is then converted into byte code with
+    <command>javac HelloWorld.java</command>. The output file is
+    <filename>HelloWorld.class</filename>.  The program is executed with
+    <command>java HelloWorld</command>.  This creates a JVM and runs the
+    code.  The 'class' extension must not be specified.</para>
+
+    <para>Several class files can be combined into one file with the
+    <command>jar</command> command. This is similar to the standard
+    <command>tar</command> command. For instance, the command
+    <command>jar cf myjar.jar *.class</command> will combine all class files
+    in a directory into one jar file. These act as library files.</para>
+
+    <para>The JVM can search for and use classes in jar files automatically.
+    It uses the <envar>CLASSPATH</envar> environment variable to search for
+    jar files. This is a standard list of colon-separated directory names
+    similar to the <envar>PATH</envar> environment variable.</para>
  
-  &lfs75_checked;
+  </sect2>
 
   <sect2 id="java-bin" xreflabel="Java Binary" role="package">
     <title>Binary JDK Information</title>
@@ -78,6 +81,8 @@
     directory to allow for multiple installations, including a source based
     version.</para>
 
+    &lfs75_checked;
+
     <bridgehead renderas="sect3">Binary Package Information</bridgehead>
     <itemizedlist spacing="compact">
       <listitem>
@@ -122,6 +127,7 @@
       <xref linkend="pulseaudio"/>, and
       <xref linkend="xorg7-lib"/>
     </para>
+
   </sect2>
 
   <sect2 role="installation">
@@ -136,11 +142,17 @@
 chown -R root:root /opt/OpenJDK-&openjdk-version;-bin</userinput></screen>
 
     <para>Configure the temporary <application>OpenJDK</application>
-    installation with the following commands:</para>
+    installation by issuing the following commands (note that if you logout
+    and login back before having definitely configured
+    <xref linkend='openjdk'/>, you'll have to issue them again):</para>
 
 <screen><userinput>export CLASSPATH=.:/usr/share/java &amp;&amp;
+export JAVA_HOME=/opt/OpenJDK-&openjdk-version;-bin &amp;&amp;
 export PATH="$PATH:/opt/OpenJDK-&openjdk-version;-bin/bin"</userinput></screen>
 
+    <para> Do not forget to reboot or to source the profile file after
+    modification.</para>
+
     <para>The binary version is now installed. If you don't want to compile the
     sources, skip ahead to the <xref linkend='openjdk-config'/> section.
     Otherwise, continue to the <xref linkend='junit'/>, <xref
-- 
http://linuxfromscratch.org/mailman/listinfo/blfs-book
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to