Ubuntu Installation Jdk/eclipse

Source: Internet
Author: User
Tags gtk

1. Download JDK

Download JDK8 from official website

Jdk-8u5-linux-x64.tar.gz

2. Decompression
$ TAR-ZXVF jdk-8u5-linux-x64.tar.gz
Extract it Out is a jdk1.8.0_05 folder
3. Move the folder to the installation directory
$ sudo mv jdk1.8.0_05/usr/local/

4. Configure environment variables, change/etc/profile file

sudo gedit/etc/profile

Add the following lines at the end of the file:

Export java_home=/usr/local/jdk1.8.0_05
Export path= $JAVA _home/bin: $JAVA _home/jre/bin: $PATH
Export classpath= $CLASSPATH:.: $JAVA _home/lib: $JAVA _home/jre/lib

5. Change the default configuration option and execute the following command sequentially

sudo update-alternatives--install/usr/bin/java Java/usr/local/jdk1.8.0_05/bin/java 300
sudo update-alternatives--install/usr/bin/javac Javac/usr/local/jdk1.8.0_05/bin/javac 300
sudo update-alternatives--install/usr/bin/jar Jar/usr/local/jdk1.8.0_05/bin/jar 300
sudo update-alternatives--install/usr/bin/javah javah/usr/local/jdk1.8.0_05/bin/javah 300
sudo update-alternatives--install/usr/bin/javap JAVAP/USR/LOCAL/JDK1.8.0_05/BIN/JAVAP 300


Install Eclipse

Environment:
Ubuntu 14.04

Steps:

1, install the configuration jdk, see http://my.oschina.net/u/1407116/blog/227084

2. Download Eclipse

Download the Linux version of Eclipse IDE for Java EE developers from official website http://www.eclipse.org/downloads/

Eclipse-sdk-3.7.2-linux-gtk.tar.gz

3. Decompression
$ TAR-ZXVF eclipse-sdk-3.7.2-linux-gtk.tar.gz
Extract it Out is an Eclipse folder
4. Move the folder to the installation directory
$ sudo mv eclipse/usr/local/
5. Start Eclipse
$/usr/local/eclipse/eclipse
6. Create a desktop link
$ sudo su
# Gedit/usr/share/applications/eclipse.desktop
Write the following content
[Desktop Entry]
Name=eclipse
Comment=eclipse SDK
Encoding=utf-8
Exec=/usr/local/eclipse/eclipse
icon=/usr/local/eclipse/icon.xpm
Terminal=false
Type=application
Categories=application;development;
You can see the Eclipse icon under application-programming when you're done.

Ubuntu Installation Jdk/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.