How to install Eclipse in Ubuntu11.04

Source: Internet
Author: User
Ubuntu11.04 the built-in Java environment of the system is openjdk. it is best to use sunjdk. the specific reason is unknown. the online tutorials are basically like this: Ubuntu1. install the Java environment that comes with JDK ubuntu 11.04 is openjdk, it is best to use sunjdk (the specific reason is unknown, the online tutorials are basically like this), so go to the official website (http://www.oracle.com/technetwork/java/javase/downloads/index.html) to download the JDK installation package "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:


Copy codeThe code is as follows:
Cd Downloads/
Sudo cp co jdk-6u26-linux-i586.bin/opt
Cd/opt
Sudo chmod + x jdk-6u26-linux-i586.bin

1.2. decompress the installation package for installation.


Copy codeThe code is as follows:
Sudo./jdk-6u26-linux-i586.bin

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


Copy codeThe code is as follows:
Sudo gedit/etc/profile

Add the following code in the text:


Copy codeThe code is as follows:
# Sun JDK profile
Export 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:


Copy codeThe code is as follows:
Sudo gedit/etc/environment

Add the following code in the text:


Copy codeThe code is as follows:
# Sun JDK environment
Export 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.


Copy codeThe code is as follows:
Sudo update-alternatives -- install/usr/bin/java/opt/jdk1.6.0 _ 26/bin/java 300
Sudo update-alternatives -- install/usr/bin/javac/opt/jdk1.6.0 _ 26/bin/javac 300

1.6. let the system use our installed JDK.


Copy codeThe code is as follows:
Sudo update-alternatives -- config java

1.7. verify that JDK is successfully installed.


Copy codeThe code is as follows:
Java-version

The following information is displayed.


Copy codeThe code is as follows:
Java version "1.6.0 _ 26"
Java (TM) SE Runtime Environment (build 1.6.0 _ 26-b03)
Java HotSpot (TM) Server VM (build between 1-b02, mixed mode)

2. install Eclipse.

2.1. first extract the downloaded compressed package and enter:


Copy codeThe code is as follows:
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:


Copy codeThe code is as follows:
[Desktop Entry]
Name = Eclipse
Comment = Eclipse IDE
Exec =/opt/eclipse
Icon =/opt/eclipse/icon. xpm
Terminal = false
Type = Application
Categories = Application; Development;

2.2 eclipse installation is complete.

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.