Install and configure JDK 6 and Eclipse3.2 on rhel5

Source: Internet
Author: User
Installation and configuration of JDK 6 and Eclipse3.2 on rhel5-Linux general technology-Linux programming and kernel information. For details, see the following. Install JDK 6
Download http://java.sun.com to jdk-6-linux-i586.bin

Authorize jdk-6-linux-i586.bin

# Chmod + x jdk-6-linux-i586.bin

Install jdk under/usr

#./Jdk-6-linux-i586.bin

In etc/profile. d, create java. sh and enter

Export JAVA_HOME =/usr/java/jdk 1.6.0

Export CLASSPATH =/usr/java/jdk1.6.0/jre/lib/rt. jar :.

Export PATH = $ PATH:/usr/java/jdk1.6.0/bin ($ PATH is the system environment variable)

Save java. sh

# Source/etc/profile

The following information can be found using the java-version command to verify that the installation is successful.
[Root @ localhost ~] # Java-version
Java version "1.6.0"
Java (TM) SE Runtime Environment (build 1.6.0-b105)
Java HotSpot (TM) Client VM (build 1.6.0-b105, mixed mode, sharing)

Eclipse Installation
1 download Eclipse, web site for the http://www.eclipse.org to select the Linux version

2? Eclipse
Extract the downloaded file:
# Tar-zxvf eclipse-SDK-3.2.2-linux-gtk.tar.gz (you can add absolute paths)

3. To enable each user to execute Eclipse, compile the Eclipse. sh script:
#! /Bin/bash
#
# Execute eclipse3.2.2
#
Export JAVA_HOME =/usr/java/jdk1.6.0
Export CLASSPATH =/usr/java/jdk1.6.0/lib
/Usr/eclipse-vm/usr/java/jdk1.6.0/bin/java-data ~ /Workspace &
#-Vm parameters are used to specify which jvm is used to execute Eclipse,
# The-date parameter is used to specify the Eclipse data directory. Specify the user root directory (~) Under the workspace directory
Copy eclipse. sh to/usr/local/bin and add permission 755 to it. Now execute eclipse. sh to start Eclipse.

4. Create a shortcut on the desktop:
Right-click the desktop and select "add startup" in the pop-up menu? E. Enter Eclipse3.2 and usr/local/bin/eclipse in "name. sh, and then find a favorite icon for it (I use/usr/eclipse/icon. xpm). Then, press "OK". The eclipse shortcut is displayed on the desktop. You can double-click this icon to start Eclipse. After Eclipse is installed, java Development Environment (JDT) has been built in to develop Java programs directly.

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.