Ubuntu 16.04 安装 Openjdk for Aptana How can I install Openjdk on Ubuntu 16.04?

Since I upgrade to the latest version of Ubuntu, cannot install Java OpenJDK needed to compile android custom roms, when I run sudo apt-get install openjdk-7-jdk appear the following error:

Reading package lists... Done Building dependency tree        Reading
state information... Done Some packages could not be installed. This
may mean that you have requested an impossible situation or if you are
using the unstable distribution that some required packages have not
yet been created or been moved out of Incoming. The following
information may help to resolve the situation:

The following packages have unmet dependencies:  openjdk-7-jdk :
 Depends: openjdk-7-jre (= 7u51-2.4.6-1ubuntu4) E: Unable to correct
 problems, you have held broken packages.

需要说明的是,Ubuntu 16.04已经不再支持 openjdk-7 的版本


The one I did on 16.04 was:


For OpenJDK 8.X

sudo apt install openjdk-8-jre

 

For OpenJDK 9.X

sudo apt install openjdk-9-jre

 

Note: There was no openjdk-6-jre nor openjdk-7-jre for me on Ubuntu 16.04. Also there is NO need to install Oracle JDK (Actually OpenJDK is much better than Oracle one for me).
shareimprove this answer


原文/转自: Ubuntu 16.04 安装 Openjdk for Aptana How can I install Openjdk on Ubuntu 16.04?

 

 

 

 

 

 

 

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值