Ubuntu/lubuntu/xubuntu Linux installation Eclipse

Source: Internet
Author: User
Tags gtk

One installation JDK


1. Download JDK 7
Choose to download the latest JDK version of JDK 7 from http://www.oracle.com/technetwork/java/javasebusiness/downloads/.


2. Unzip the file
$ sudo MKDIR/USR/LIB/JVM
$ sudo mv jdk-7u4-linux-i586.tar.gz/usr/lib/jvm/


$ cd/usr/lib/jvm/
$ sudo tar-zxvf jdk-7u4-linux-i586.tar.gz
$ rm./jdk-7u4-linux-i586.tar.gz


3. Configuration


$ sudo gedit/etc/environment


Modify path in environment, append JDK path, add classpath and Java_home as follows:
Path= "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/lib/jvm/jdk1.7.0_04/bin"
Classpath= "/usr/lib/jvm/jdk1.7.0_04/lib"
Java_home= "/usr/lib/jvm/jdk1.7.0_04"


And then we're going to tell the system that we're using Sun's JDK, not OPENJDK:


$ sudo update-alternatives--install/usr/bin/java Java/usr/lib/jvm/jdk1.7.0_04/bin/java 300
$ sudo update-alternatives--install/usr/bin/javac Javac/usr/lib/jvm/jdk1.7.0_04/bin/javac 300
$ sudo update-alternatives--config java
There are 2 candidates that can be used to replace Java (providing/usr/bin/java).
Select Path Priority state
------------------------------------------------------------
* 0/usr/lib/jvm/java-6-openjdk/jre/bin/java 1061 Auto mode
1/usr/lib/jvm/java-6-openjdk/jre/bin/java 1061 Manual Mode
2/usr/lib/jvm/jdk1.7.0_04/bin/java 300 Manual Mode
To maintain the current value [*] press ENTER, or type the number of your choice: 2
As shown above, this will set up the Java to be used.


Two install eclipse


1. Download Eclipse

Download the appropriate version from http://www.eclipse.org/downloads/index-developer.php, such as: Eclipse IDE for C + + developers

2. Unzip the file
$ sudo mv eclipse-cpp-juno-m7-linux-gtk.tar.gz/usr/lib/
$ cd/usr/lib/
$ sudo tar-zxvf eclipse-cpp-juno-m7-linux-gtk.tar.gz
$ sudo rm./eclipse-cpp-juno-m7-linux-gtk.tar.gz

3. Create a startup shortcut
$ sudo gedit/usr/share/applications/eclipse.desktop
The contents are as follows:
[Desktop Entry]
Type=application
Name=eclipse
Comment=eclipse Integrated Development environment
icon=/usr/lib/eclipse/icon.xpm
Exec=/usr/lib/eclipse/eclipse
Terminal=false
Categories=development;ide; Java;

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Ubuntu/lubuntu/xubuntu Linux installation Eclipse

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.