mirror of
https://github.com/Zeckmathederg/glfs.git
synced 2025-01-27 09:42:12 +08:00
58cba7f0df
git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@15607 af4574ff-66df-0310-9fd7-8a98e5e911e0
85 lines
2.5 KiB
XML
85 lines
2.5 KiB
XML
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
|
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
|
<!ENTITY % general-entities SYSTEM "../../general.ent">
|
|
%general-entities;
|
|
]>
|
|
|
|
<sect1 id="ojdk-conf" xreflabel="Configuring the JAVA environment">
|
|
<?dbhtml filename="ojdk-conf.html"?>
|
|
|
|
<sect1info>
|
|
<othername>$LastChangedBy$</othername>
|
|
<date>$Date$</date>
|
|
</sect1info>
|
|
|
|
<title>Configuring the JAVA environment</title>
|
|
|
|
<para>
|
|
After the package installation is complete, the next step is to make sure
|
|
that the system can properly find the files. If you set up your login
|
|
scripts as recommended in <xref linkend='postlfs-config-profile'/>, update
|
|
the environment by creating the <filename>openjdk.sh</filename> script,
|
|
as the <systemitem class="username">root</systemitem> user:
|
|
</para>
|
|
|
|
<screen role="root"><userinput>cat > /etc/profile.d/openjdk.sh << "EOF"
|
|
<literal># Begin /etc/profile.d/openjdk.sh
|
|
|
|
# Set JAVA_HOME directory
|
|
JAVA_HOME=/opt/jdk
|
|
|
|
# Adjust PATH
|
|
pathappend $JAVA_HOME/bin
|
|
|
|
# Add to MANPATH
|
|
pathappend $JAVA_HOME/man MANPATH
|
|
|
|
# Auto Java CLASSPATH: Copy jar files to, or create symlinks in, the
|
|
# /usr/share/java directory. Note that having gcj jars with OpenJDK 8
|
|
# may lead to errors.
|
|
|
|
AUTO_CLASSPATH_DIR=/usr/share/java
|
|
|
|
pathprepend . CLASSPATH
|
|
|
|
for dir in `find ${AUTO_CLASSPATH_DIR} -type d 2>/dev/null`; do
|
|
pathappend $dir CLASSPATH
|
|
done
|
|
|
|
for jar in `find ${AUTO_CLASSPATH_DIR} -name "*.jar" 2>/dev/null`; do
|
|
pathappend $jar CLASSPATH
|
|
done
|
|
|
|
export JAVA_HOME
|
|
unset AUTO_CLASSPATH_DIR dir jar
|
|
|
|
# End /etc/profile.d/openjdk.sh</literal>
|
|
EOF</userinput></screen>
|
|
|
|
<para>
|
|
For allowing <command>mandb</command> to include the OpenJDK man pages
|
|
in its database, issue, as the <systemitem class="username">root
|
|
</systemitem> user:
|
|
</para>
|
|
|
|
<screen role="root"><userinput>cat >> /etc/man_db.conf << "EOF" &&
|
|
<literal># Begin Java addition
|
|
MANDATORY_MANPATH /opt/jdk/man
|
|
MANPATH_MAP /opt/jdk/bin /opt/jdk/man
|
|
MANDB_MAP /opt/jdk/man /var/cache/man/jdk
|
|
# End Java addition</literal>
|
|
EOF
|
|
|
|
mkdir -p /var/cache/man
|
|
mandb -c /opt/jdk/man</userinput></screen>
|
|
|
|
<para>
|
|
The installation of the JRE Certificate Autority Certificates (cacerts)
|
|
is described in the <xref linkend="ojdk-certs"/> section.
|
|
If you are using the binary version, those certificates may already be
|
|
installed.
|
|
</para>
|
|
|
|
</sect1>
|