Build a Java Development Environment on the Linux platform (JDK + Eclipse + Tomcat)

Source: Internet
Author: User
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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.