We know that OPENJDK may be installed in Ubuntu beforehand. But I'm used to Oracle JDK.
Markdown Syntax writing format:
#2016.03.29
# # < Uninstall OPENJDK > successfully;
# # # Terminal Command:sudo apt-get purge Openjdk/openjdk*;sudo apt-get Clean/autoclean;
We should have removed the OPENJDK from the system at this time.
##< Download and install Oracle JDK > successfully;
# # # Terminal COMMAND:TAR–ZXVF jdk-8u77-linux-x64.tar.gz; sudo mv./jdk-8u77-linux-x64/opt/java
Download Oracle JDK to Oracle (http://www.oracle.com/) 's Oracle JDK website (http://www.oracle.com/technetwork/java/javase/ downloads/jdk8-downloads-2133151.html), depending on the operating system to provide a different installation package, download the appropriate package can be.
After unpacking the Ubuntu desktop, move to/opt/java, which gives it a separate folder for managing and setting environment variables. At this point, everything is correct, next we <i> set environment variable </i>.
##< JDK environment variable settings > successfully;
# # #Terminal Command:sudo gedit/etc/profile;source/etc/profile
```
Export Java_home=/opt/java/java Version number
Export JRE_HOME=${JAVA_HOME}/JRE
Export Classpath=.:${java_home}/lib:${jre_home}/lib
Export Path=${java_home}/bin: $PATH
```
As to whether the environment variable is set correctly, it can be tested
```
$java –version
$javac
```
##< installing eclipse > successfully;
# # # Terminal command: $sudo tar–zxvf eclipse-java-mars-2-linux-gtk-x86_64.tar.gz; $mv. Eclipse-java-mars-2-linux-gtk-x86_64
Eclipse is an open-source software for Java development. Linux X64 version of Eclipse (http://www.eclipse.org/) (http://mirrors.ustc.edu.cn/eclipse/technology/epp/downloads/ release/mars/2/eclipse-java-mars-2-linux-gtk-x86_64.tar.gz). Unzip and place in the folder you feel fit.
Ubuntu 16.04 LTS Final Beta about JAVA