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