This document is a learning note. If you are a veteran, ignore it. Preparation: Supervisor 1. Install JDK1 and switch to the root user. 2. Enter the sudonautilus command to open the root user directory.
This document is a learning note. If you are a veteran, ignore it.
Preparation:
1. Ubuntu 11.04 English version
2. jdk-6u25-linux-i586.bin
3366apache-tomcat-5.5.29.tar.gz
4、Eclipse-SDK-3.5.2-for-Linux.gz
1. Install JDK1 and switch to the root user
2. Enter the command sudo nautilus to open the root user directory, create a new jvm directory under the usr/lib directory, copy the jdk-6u25-linux-i586.bin to this folder.
Note: sudo nautilus allows you to open a file browser with the root user permission, so that you can read and write and modify all files. Root users are super users with all permissions.
3. Run jdk-6u25-linux-i586.bin.
Enter the command sudo chmod u + x jdk-6u25-linux-i586.bin with executable permissions
Enter the command./jdk-6u25-linux-i586.bin to start jdk installation, which will generate the jdk1.6.0 _ 25 folder under the current directory, that is, the installation directory.
4. Enter the sudo nautilus command to open the root user directory, enter the etc directory under File System, and open environment (note that this is the configuration File of environment variables, which must be modified under the root user, other users generally do not have permissions ).
Configure the PATH variable:
Add "/usr/lib/jvm/jdk1.6.0 _ 25" to the PATH variable. Note that each configuration is separated by a colon (:). The specific PATH should be based on the jdk installation PATH, the same below.
Configure the CLASSPATH variable:
CLASSPATH =.:/usr/lib/jvm/jdk1.6.0 _ 25/lib
Configure JAVA_HOME
JAVA_HOME =/usr/lib/jvm/jdk1.6.0 _ 25
5. System Management
Update-alternatives -- install/usr/bin/java/usr/lib/jvm/java/jdk1.6.0 _ 12/bin/java 300
Update-alternatives -- install/usr/bin/javac/usr/lib/jvm/java/jdk1.6.0 _ 12/bin/javac 300
Update-alternatives -- config java
6. Test the JDK installation result:
Enter the command: java-version
Display
Java version "1.6.0 _ 25"
Java (TM) SE Runtime Environment (build 1.6.0 _ 25-b06)
Java HotSpot (TM) Client VM (build between 0-b11, mixed mode, sharing)
The installation is successful.