Typo
[linux_from_scratch_hints.git] / OLD / java.txt
blob26c825bb6a7592618677084827fe5824a9a0f8d2
1 TITLE:          Installing the Java SDK
3 LFS VERSION:    3.3
5 AUTHOR:         timothy bauscher <timothy@linuxfromscratch.org>
7 SYNOPSIS:       This hint describes the installation of
8                 the Java Software Development Kit.
10 HINT:
13 INTRODUCTION
14 ============
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
23 hint.
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.
30 DOWNLOAD
31 ========
33 http://java.sun.com/j2se/1.3/download.html
37 http://java.sun.com/j2se/1.4/download.html
40 DEPENDENCIES
41 ============
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
45 options:
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
54         (not documented here)
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.
63 INSTALL
64 =======
66 Change to the directory where the SDK was downloaded. Then,
67 type the following:
69         mv j2sdk*.bin /opt &&
70         cd /opt &&
71         chmod a+x j2sdk*.bin &&
72         ./j2sdk*.bin
74 The large installation file may now be removed.
76         rm j2sdk*.bin
78 Let us rename the directory now.
80         mv j2sdk* j2sdk
82 Login to a user account.
84         su - <USER_NAME>
87 PATHS
88 =====
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
97 export PATH MANPATH
99 EOF
100 source ~/.bash_profile
103 TEST
104 ====
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 &&
122         java Testing
125 LICENSES
126 ========
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.