Installing openjdk-7-jdk on Ubuntu 16.04 LTS

来源:互联网 发布:淘宝客服聊天技巧 编辑:程序博客网 时间:2024/05/05 20:24
Ubuntu 16.04 LTS, sudo apt-cache search openjdk 时,搜索到的是 openjdk-8-jdk,但是这个 openjdk-8-jdk 在编译 Android Source Code时又报错误,因为Android Source Code要求 1.7版本的 JDK,通过在 source.list 中添加 openjdk-7-jdk source的形式,能够在 sudo apt-cache search openjdk 时搜索到 openjdk-7-jdk,但是安装时会报错,各种依赖关系得不到满足。在 http://forum.ubuntu.org.cn/viewtopic.php?f=48&t=477645 中搜索到的解决方案:sudo add-apt-repository ppa:openjdk-r/ppa  sudo apt-get update   sudo apt-get install openjdk-7-jre经过验证,确实可以解决问题。然后:man add-apt-repositoryNAME       add-apt-repository - Adds a repository into the /etc/apt/sources.list or /etc/apt/sources.list.d or removes an existing oneSYNOPSIS       add-apt-repository [OPTIONS] REPOSITORYDESCRIPTION       add-apt-repository is a script which adds an external APT repository to either /etc/apt/sources.list or a file in /etc/apt/sources.list.d/ or removes an already existing repository.
0 0