source: general/prog/ojdk-conf.xml@ ac38e9dc

systemd-13485
Last change on this file since ac38e9dc was ac38e9dc, checked in by Douglas R. Reno <renodr@…>, 9 years ago

Import back into SVN from Github

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/branches/systemd@16309 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 2.8 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
8<sect1 id="ojdk-conf" xreflabel="Configuring the JAVA environment">
9 <?dbhtml filename="ojdk-conf.html"?>
10
11 <sect1info>
12 <othername>$LastChangedBy$</othername>
13 <date>$Date$</date>
14 </sect1info>
15
16 <title>Configuring the JAVA environment</title>
17
18 <para>
19 After the package installation is complete, the next step is to make sure
20 that the system can properly find the files. If you set up your login
21 scripts as recommended in <xref linkend='postlfs-config-profile'/>, update
22 the environment by creating the <filename>openjdk.sh</filename> script,
23 as the <systemitem class="username">root</systemitem> user:
24 </para>
25
26<screen role="root"><userinput>cat &gt; /etc/profile.d/openjdk.sh &lt;&lt; "EOF"
27<literal># Begin /etc/profile.d/openjdk.sh
28
29# Set JAVA_HOME directory
30JAVA_HOME=/opt/jdk
31
32# Adjust PATH
33pathappend $JAVA_HOME/bin
34
35# Add to MANPATH
36pathappend $JAVA_HOME/man MANPATH
37
38# Make sure C and C++ compilers can find Java headers
39pathappend $JAVA_HOME/include C_INCLUDE_PATH
40pathappend $JAVA_HOME/include/linux C_INCLUDE_PATH
41pathappend $JAVA_HOME/include CPLUS_INCLUDE_PATH
42pathappend $JAVA_HOME/include/linux CPLUS_INCLUDE_PATH
43
44# Auto Java CLASSPATH: Copy jar files to, or create symlinks in, the
45# /usr/share/java directory. Note that having gcj jars with OpenJDK 8
46# may lead to errors.
47
48AUTO_CLASSPATH_DIR=/usr/share/java
49
50pathprepend . CLASSPATH
51
52for dir in `find ${AUTO_CLASSPATH_DIR} -type d 2>/dev/null`; do
53 pathappend $dir CLASSPATH
54done
55
56for jar in `find ${AUTO_CLASSPATH_DIR} -name "*.jar" 2>/dev/null`; do
57 pathappend $jar CLASSPATH
58done
59
60export JAVA_HOME
61unset AUTO_CLASSPATH_DIR dir jar
62
63# End /etc/profile.d/openjdk.sh</literal>
64EOF</userinput></screen>
65
66 <para>
67 For allowing <command>mandb</command> to include the OpenJDK man pages
68 in its database, issue, as the <systemitem class="username">root
69 </systemitem> user:
70 </para>
71
72<screen role="root"><userinput>cat &gt;&gt; /etc/man_db.conf &lt;&lt; "EOF" &amp;&amp;
73<literal># Begin Java addition
74MANDATORY_MANPATH /opt/jdk/man
75MANPATH_MAP /opt/jdk/bin /opt/jdk/man
76MANDB_MAP /opt/jdk/man /var/cache/man/jdk
77# End Java addition</literal>
78EOF
79
80mkdir -p /var/cache/man
81mandb -c /opt/jdk/man</userinput></screen>
82
83 <para>
84 The installation of the JRE Certificate Autority Certificates (cacerts)
85 is described in the <xref linkend="ojdk-certs"/> section.
86 If you are using the binary version, those certificates may already be
87 installed.
88 </para>
89
90</sect1>
Note: See TracBrowser for help on using the repository browser.