Install eclipse in Ubuntu 11.04

Source: Internet
Author: User
1. Install JDK Ubuntu 11.04 built-in Java environment is openjdk, it is best to use sunjdk (the specific reason is unknown, the online tutorial is basically like this), so go to the official website (http://www.oracle.com/technetwork/java/javase/downloads/index.html) download"
JDK installation package for Java SE 6 Update 26: Linux x86-self extracting Installer (81.20 MB) jdk-6u26-linux-i586.bin

1.1. After downloading the SDK, start to install JDK. Enter the following in the terminal:

cd Downloads/
sudo cp jdk-6u26-linux-i586.bin /opt
cd /opt
sudo chmod +x jdk-6u26-linux-i586.bin

1.2. decompress the installation package for installation.

sudo ./jdk-6u26-linux-i586.bin

1.3. Configure the environment variable and modify the profile file.

sudo gedit /etc/profile

Add the following code in the text:

# Sun JDK profileexport JAVA_HOME=/opt/jdk1.6.0_26
export JRE_HOME=/opt/jdk1.6.0_26/jre
export CLASSPATH=.:$CLASSPATH:$JAVA_HOME/lib:$JAVA_HOME/jre/lib
export PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH:$HOME/bin

1.4. Modify another file, environment:

sudo gedit /etc/environment

Add the following code in the text:

# Sun JDK environmentexport JAVA_HOME=/opt/jdk1.6.0_26
export JRE_Home=/opt/jdk1.6.0_26/jre
export CLASSPATH=.:$CLASSPATH:$JAVA_HOME/lib:$JAVA_HOME/jre/lib

1.5. manually configure JDK.

sudo update-alternatives --install /usr/bin/java java /opt/jdk1.6.0_26/bin/java 300
sudo update-alternatives --install /usr/bin/javac javac /opt/jdk1.6.0_26/bin/javac 300

1.6. Let the system use our installed JDK.

sudo update-alternatives --config java

1.7. Verify that JDK is successfully installed.

java –version

The following information is displayed.

java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) Server VM (build 20.1-b02, mixed mode)

2. Install eclipse.

2.1. First extract the downloaded compressed package and enter:

tar -zxvf eclipse-SDK-3.6.2-linux-gtk.tar.gz
sudo mv eclipse /opt/
sudo gedit /usr/share/applications/Eclipse.desktop

Fill in the text:

[Desktop Entry]
Name=Eclipse
Comment=Eclipse IDE
Exec=/opt/eclipse/eclipse
Icon=/opt/eclipse/icon.xpm
Terminal=false
Type=Application
Categories=Application;Development;

2.2 eclipse installation is complete.

Note:
1) many versions of the eclipse official website are dizzy. Google found that classic is the basic version and provides the most basic functions. Eclipse IDE for Java developer adds some Java Development plug-ins based on classic. Eclipse IDE for Java EE developers adds some J2EE development plug-ins based on classic. You can select the corresponding version as needed during download.
2) the configuration of java_home and jre_home in the environment variables is actually the same as that in the environment variables under Windows, and so on. It is mainly to specify the program running directory bin and the corresponding library file Lib, which can be found to be regular.
3) configure the android environment to install the ADT plug-in, you can refer to the previous document (http://www.cppblog.com/deercoder/archive/2011/09/11/155572.html ).

References:
1) Installation Guide: http://www.cnblogs.com/williamwue/archive/2011/06/23/2088315.html
2) eclipse version Description: http://topic.csdn.net/u/20080609/19/4016b980-51a6-40ee-9129-06c30ceda251.html

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.