Ubuntu 16.04 LTS Final Beta about JAVA

Source: Internet
Author: User

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

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.