How can I install openjdk-7-jdk on lucid 10.04 LTS? [closed]

纵然是瞬间 提交于 2020-01-02 00:52:23

问题


I'm currently using JDK 6 on a Ubuntu 10.04 LTS server.

Since Oracle will not allow JDK 6 in Ubuntu repos now, it looks like OpenJDK 7 is the best alternative https://lists.ubuntu.com/archives/ubuntu-security-announce/2012-January/001554.html

I noticed OpenJDK 7 available on 11.10 as a package, but is there a backport package to lucid 10.04 LTS?

I found this one https://launchpad.net/~openjdk but it is one year out of date.


回答1:


You can get Sun Java 6 from http://blog.flexion.org/2012/01/16/install-sun-java-6-jre-jdk-from-deb-packages/ but make sure to read the comments as there may be updates from the developer himself.

This may be the best option for a few reasons:
1. Ortang's suggestion of using the OpenJDK PPA has old versions of OpenJDK and is not recommended. I couldn't even get OpenJDK 7 to install on my Lucid box even though it said it was supported.
2. The Canonical Parters repository will be not be updated in the future due to the change in Oracle's policies so do not pull the Java from it. Simply changing your sources.list to Oneiric will not help for older releases.

Of course if you need Sun Java 7, try http://www.webupd8.org/2012/01/install-oracle-java-jdk-7-in-ubuntu-via.html as previously suggested. I have not tested it, but the WebUpd8 guys are pretty reliable.




回答2:


Go to /etc/apt/sources.list find

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
deb http://archive.canonical.com/ubuntu oneiric partner
deb-src http://archive.canonical.com/ubuntu oneiric partner

and uncomment the last 2 lines (as shown). Execute sudo apt-get update

than type sudo apt-get install sun and hit 'tab' button...see if that helps.



来源:https://stackoverflow.com/questions/8914679/how-can-i-install-openjdk-7-jdk-on-lucid-10-04-lts

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!