1 TITLE: Installing the Java SDK
5 AUTHOR: timothy bauscher <timothy@linuxfromscratch.org>
7 SYNOPSIS: This hint describes the installation of
8 the Java Software Development Kit.
16 Sun's Java Software Development Kit is a proprietary software
17 package used to develop and run applications written in the
18 Java programming language.
20 This hint describes the process of installing a binary version
21 of the Java Software Development Kit. Should you wish to install
22 from source instead, I encourage you to read the Java From Scratch
25 This hint assumes that you are logged in as root. The SDK will
26 be installed in the /opt directory. Paths will be appended to
27 your ~/.bash_profile file.
33 http://java.sun.com/j2se/1.3/download.html
37 http://java.sun.com/j2se/1.4/download.html
43 You must have libstdc++-libc6.1-1.so.2 installed in /usr/lib/ before
44 you may run the programs in the SDK. There are three installation
47 A. Create a symbolic link to a similar library
49 ln -s /usr/lib/libstdc++-3-*.so \
50 /usr/lib/libstdc++-libc6.1-1.so.2
52 B. Compile the library yourself
56 C. Download the library in binary format
58 http://www.linuxfromscratch.org/~timothy/misc/libstdc++-libc6.1-1.so.2
60 Thanks go out to conathan for providing this binary library.
66 Change to the directory where the SDK was downloaded. Then,
71 chmod a+x j2sdk*.bin &&
74 The large installation file may now be removed.
78 Let us rename the directory now.
82 Login to a user account.
90 Type the following, so that your PATH and MANPATH point to the SDK:
92 cat >> ~/.bash_profile << "EOF"
94 PATH=$PATH:/opt/j2sdk/bin
95 MANPATH=$MANPATH:/opt/j2sdk/man/man1
100 source ~/.bash_profile
106 To make sure the SDK is working, we write a test program:
108 cat > Testing.java << "EOF"
110 public class Testing {
112 public static void main (String[] args) {
113 System.out.println("I love Java!");
119 Compile and run Testing.java by typing:
121 javac Testing.java &&
128 You may copy, modify, redistribute, and sell this hint on
129 any media. The author cannot be held liable for anything
130 even remotely related to this hint.
132 The SDK is distributed under its own proprietary license.