source: general/prog/jdk/j2sdk-config.xml@ 0990cf7a

10.0 10.1 11.0 6.0 6.1 6.2 6.2.0 6.2.0-rc1 6.2.0-rc2 6.3 6.3-rc1 6.3-rc2 6.3-rc3 7.10 7.4 7.5 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 ken/refactor-virt krejzi/svn lazarus nosym perl-modules qt5new systemd-11177 systemd-13485 trunk v5_1 xry111/git-date xry111/git-date-for-trunk xry111/git-date-test
Last change on this file since 0990cf7a was 0990cf7a, checked in by Bruce Dubbs <bdubbs@…>, 17 years ago

More commas, update Makefile

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

  • Property mode set to 100644
File size: 1.9 KB
Line 
1<sect2>
2<title>Configuring <application>J2SDK</application></title>
3
4<sect3><title>Configuration Information</title>
5
6<para>We have two Java 2 <acronym>SDK</acronym>'s installed in
7<filename>/opt/j2sdk</filename>. Decide on which one you
8would like to use as the default. For example if you decide to use the source
9compiled <application>J2SDK</application>, do the following:</para>
10
11<screen><userinput><command>ln -nsf j2sdk-&j2sdk-src-version; /opt/j2sdk/j2sdk</command></userinput></screen>
12
13<para>Add the following lines to your shell startup file (e.g.,
14<filename>/etc/profile</filename>).</para>
15
16<screen><userinput>export JAVA_HOME=/opt/j2sdk/j2sdk
17export PATH=$PATH:$JAVA_HOME/bin</userinput></screen>
18
19<para>Add <filename>$JAVA_HOME/man</filename> to your
20<envar>MANPATH</envar> variable or to
21<filename>/etc/man.conf</filename></para>
22
23<para>The <application>Java</application> plugin is in the directory
24<filename class="directory">$JAVA_HOME/jre/plugin/i?86/ns610/</filename>.
25Make a symbolic link to the file in that directory from your plugins directory.
26</para>
27
28</sect3>
29
30<sect3><title>Handling CLASSPATH</title>
31
32<para>When compiling packages, the <envar>CLASSPATH</envar> environment variable
33is used by JDK to locate classes at compile-time and run-time. It is tedious to
34add all the classes used to the <envar>CLASSPATH</envar> manually. You may add
35the following lines to your shell startup file to set <envar>CLASSPATH</envar>
36automatically to include all JAR files in a specified directory, which in
37the example below is <filename>/usr/lib/auto-java-classpath</filename>.</para>
38
39<screen><userinput>AUTO_CLASSPATH_DIR=/usr/lib/auto-java-classpath
40if [ -z $CLASSPATH ]
41then
42 CLASSPATH=.:$AUTO_CLASSPATH_DIR
43else
44 CLASSPATH=$CLASSPATH:.:$AUTO_CLASSPATH_DIR
45fi
46for i in $(ls $AUTO_CLASSPATH_DIR/*.jar 2>/dev/null)
47do
48 CLASSPATH=$CLASSPATH:$i
49done</userinput></screen>
50
51</sect3>
52
53</sect2>
Note: See TracBrowser for help on using the repository browser.