Ubuntu 16.04 Installation OpenJDK 1.7

Source: Internet
Author: User

Because compiling Android source code requires openjdk1.7.x version. Ubuntu 16.04 comes with a 1.8.X version of OPENJDK.

sudo apt-get install openjdk-7-jre or sudo apt-get install OPENJDK-7-JDK

If it appears

There is no available package openjdk-7-jdk, but it is referenced by other packages.

This may mean that the missing package may have been discarded, or it could only be found in other publishing sources

E: Package OPENJDK-7-JDK No installable candidate

You can install the 1.7.X version according to the operation

sudo add-apt-repository ppa:openjdk-r/ppa  sudo apt-get update   sudo apt-get install openjdk-7-jdk 如果安装成功之后还是不能用可能不有多个版本,选的不对
sudo update-alternatives--config javasudo update-alternatives--config Javac pick the right version

Ubuntu 16.04 Installation OpenJDK 1.7

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.