An explanation of how to install eclipse under Ubuntu

Source: Internet
Author: User


Eclipse is a great tool for developing programs, so it's a good idea to install eclipse in Ubuntu, first get the Eclipse installation package (official website, suggestion: http://www.eclipse.org/downloads/ Download.php?file=/technology/epp/downloads/release/luna/r/eclipse-standard-luna-r-linux-gtk-x86_64. tar.gz), next find the downloaded directory, copy the Eclipse installation package to/usr/local/eclipse (sudo cp download directory/usr/local/eclipse), then unzip, sudo tar-zxvf (Note the preceding command sudo is because I am logged in as a normal user, if it is the root of the login, the front does not need to add sudo), after decompression can see the Eclipse directory, this place can actually run the Eclipse program, We can call the Eclipse program by running/usr/local/eclipse/eclipse/eclipse in the terminal, but there is a problem with the installation package, it will pop up to indicate that the JVM version is too low, at least what version is needed, Obviously the first thing we think of is to download a version of the JVM that matches the hint, that is, the version of the JDK, after downloading to the appropriate installation package, unzip it, and then follow the procedure as follows:

# will unzip the good jdk1.8.0.5 (The version number of this place to see how you fill out, if it is 1.8.0_20 then the following corresponding also to be replaced) folder is copied to the/USR/LIB/JVM directory with the highest permissions.
sudo cp-r ~/jdk1.8.0.5//usr/lib/jvm/

STEP2:
# Configure Environment Variables
sudo gedit ~/.profile
at the end add:
export java_home=/usr/lib/jvm/jdk1.8.0.5
then save the shutdown, using the source update under
$ source ~/.profile

Use the ENV command to see the value of Java_home
$ env
if java_home=/usr/lib/jvm/jdk1.8.0.5, the configuration is successful.

STEP3:
# Modify the system's default JDK .
$ sudo update-alternatives--install/usr/bin/java java/usr/lib/jvm/jdk1.8.0.5/bin/java

just enter the numbers in front of the sun JDK .
$ sudo update-alternatives--install/usr/bin/javac javac/usr/lib/jvm/jdk1.8.0.5/bin/javac

$ sudo update-alternatives--config java
$ sudo update-alternatives--config javac

STEP4:
then enter java-version and see the following information to change to the Sun's JDK:
JAVA Version "jdk1.8.0.5"
JAVA (TM) SE Runtime Environment (buildjdk1.8.0.5-b20)
JAVA HotSpot (TM) Server VM (build 23.0-b21, mixed mode)

When all this is done, we'll see that the JDK version has changed, and then we've put the icon on the desktop, and we need to add a statement like sudo gedit/usr/share/applications/eclipse.desktop, Then write the following statement inside:

[Desktop Entry]

encoding=utf-8

Name=Eclipse

comment=Eclipse IDE

exec=/usr/local/eclipse/eclipse_sdk/Eclipse

icon=/usr/local/eclipse/eclipse_sdk/icon.xpm

Terminal=false

Startupnotify=true

Type=Application

categories=application;development;

exec=/usr/local/eclipse/eclipse_sdk/Eclipseicon=/usr/local/eclipse/eclipse_sdk/icon.xpm This place is to be modified for your Eclipse installation directory.

Then save it off, and then you can? NO, we also need to manually copy the Eclipse.desktop to the desktop and execute the following statement:

sudo cp/usr/share/applications/eclipse.desktop/home/yourname/desktop

Wait, maybe after that, your icon doesn't seem to be our common one, but a blank with a lock button on it, maybe you're not root, you don't have access to the file, and then you execute a statement:

sudo chmod 777/home/yourname/desktop/eclipse.desktop

Then the icon is programmed to be available.


Well, that's it, you said it is easy to use, it is not good to use. period!





An explanation of how to install eclipse under Ubuntu

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.