Changeset d7df10f3


Ignore:
Timestamp:
03/29/2014 08:32:20 PM (10 years ago)
Author:
Pierre Labastie <pieere@…>
Branches:
10.0, 10.1, 11.0, 11.1, 11.2, 11.3, 12.0, 12.1, 7.10, 7.6, 7.6-blfs, 7.6-systemd, 7.7, 7.8, 7.9, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, basic, bdubbs/svn, elogind, gnome, kde5-13430, kde5-14269, kde5-14686, kea, ken/TL2024, ken/inkscape-core-mods, ken/tuningfonts, krejzi/svn, lazarus, lxqt, nosym, perl-modules, plabs/newcss, plabs/python-mods, python3.11, qt5new, rahul/power-profiles-daemon, renodr/vulkan-addition, systemd-11177, systemd-13485, trunk, upgradedb, xry111/intltool, xry111/llvm18, xry111/soup3, xry111/test-20220226, xry111/xf86-video-removal
Children:
9ceb07f
Parents:
7f8868f
Message:

Really make JAva binary versioned

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • general/prog/java.xml

    r7f8868f rd7df10f3  
    2525  </sect1info>
    2626
    27   <title>About Java</title>
     27  <title>Java-&openjdk-version;</title>
    2828
    2929  <indexterm zone="java">
     
    3232
    3333
    34   <para>Java is different from most of the packages in LFS and BLFS.  It
    35   is a programming language that works with files of byte codes to obtain
    36   instructions and executes then in a Java Virtual Machine (JVM).  An
    37   introductory java program looks like:</para>
     34  <sect2>
     35    <title>About Java</title>
     36    <para>Java is different from most of the packages in LFS and BLFS. It
     37    is a programming language that works with files of byte codes to obtain
     38    instructions and executes then in a Java Virtual Machine (JVM). An
     39    introductory java program looks like:</para>
    3840
    3941<screen><literal>public class HelloWorld
     
    4547}</literal></screen>
    4648
    47   <para>This program is saved as <filename>HelloWorld.java</filename>.  The file
    48   name, <emphasis>HelloWorld</emphasis>, must match the class name.  It
    49   is then converted into byte code with <command>javac HelloWorld.java</command>.
    50   The output file is <filename>HelloWorld.class</filename>.  The program is
    51   executed with <command>java HelloWorld</command>.  This creates a JVM and
    52   runs the code.  The 'class' extension must not be specified.</para>
     49    <para>This program is saved as <filename>HelloWorld.java</filename>. The
     50    file name, <emphasis>HelloWorld</emphasis>, must match the class name. It
     51    is then converted into byte code with
     52    <command>javac HelloWorld.java</command>. The output file is
     53    <filename>HelloWorld.class</filename>.  The program is executed with
     54    <command>java HelloWorld</command>.  This creates a JVM and runs the
     55    code.  The 'class' extension must not be specified.</para>
    5356
    54   <para>Several class files can be combined into one file with the
    55   <command>jar</command> command. This is similar to the standard
    56   <command>tar</command> command.  For instance, the command <command>jar cf myjar.jar
    57   *.class</command> will combine all class files in a directory into one jar
    58   file. These act as library files.</para>
     57    <para>Several class files can be combined into one file with the
     58    <command>jar</command> command. This is similar to the standard
     59    <command>tar</command> command. For instance, the command
     60    <command>jar cf myjar.jar *.class</command> will combine all class files
     61    in a directory into one jar file. These act as library files.</para>
    5962
    60   <para>The JVM can search for and use classes in jar files automatically.  It
    61   uses the <envar>CLASSPATH</envar> environment variable to search for jar files.
    62   This is a standard list of colon-separated directory names similar to
    63   the <envar>PATH</envar> environment variable.</para>
     63    <para>The JVM can search for and use classes in jar files automatically.
     64    It uses the <envar>CLASSPATH</envar> environment variable to search for
     65    jar files. This is a standard list of colon-separated directory names
     66    similar to the <envar>PATH</envar> environment variable.</para>
    6467 
    65   &lfs75_checked;
     68  </sect2>
    6669
    6770  <sect2 id="java-bin" xreflabel="Java Binary" role="package">
     
    7881    directory to allow for multiple installations, including a source based
    7982    version.</para>
     83
     84    &lfs75_checked;
    8085
    8186    <bridgehead renderas="sect3">Binary Package Information</bridgehead>
     
    123128      <xref linkend="xorg7-lib"/>
    124129    </para>
     130
    125131  </sect2>
    126132
     
    137143
    138144    <para>Configure the temporary <application>OpenJDK</application>
    139     installation with the following commands:</para>
     145    installation by issuing the following commands (note that if you logout
     146    and login back before having definitely configured
     147    <xref linkend='openjdk'/>, you'll have to issue them again):</para>
    140148
    141149<screen><userinput>export CLASSPATH=.:/usr/share/java &amp;&amp;
     150export JAVA_HOME=/opt/OpenJDK-&openjdk-version;-bin &amp;&amp;
    142151export PATH="$PATH:/opt/OpenJDK-&openjdk-version;-bin/bin"</userinput></screen>
     152
     153    <para> Do not forget to reboot or to source the profile file after
     154    modification.</para>
    143155
    144156    <para>The binary version is now installed. If you don't want to compile the
Note: See TracChangeset for help on using the changeset viewer.