How to find the list of openjdk version available to download from Termminal ?

Asked by Avin on 2016-06-27

How to find the list of openjdk version available to download from Terminal ?

Because I am using below command to install specific version of openjdk,
Facing this issue. (referred: https://launchpad.net/ubuntu/+source/openjdk-6/6b18-1.8.2-4ubuntu2)

$ sudo apt-get install openjdk-6-jdk=6b18-1.8.2-4ubuntu1~9.10.1
Building dependency tree
Reading state information... Done
E: Version '6b18-1.8.2-4ubuntu1~9.10.1' for 'openjdk-6-jdk' was not found

Thanks.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu openjdk-8 Edit question
Assignee:
No assignee Edit question
Solved by:
Manfred Hampl
Solved:
2016-06-29
Last query:
2016-06-29
Last reply:
2016-06-28
Manfred Hampl (m-hampl) said : #1

You can look a the Launchpad pages like https://launchpad.net/ubuntu/+source/openjdk-8 to see the available version(s) for your Ubuntu release, or pages like http://packages.ubuntu.com/search?keywords=openjdk-&searchon=names&suite=all&section=all

You can only select packages fitting to the Ubuntu release that you are running.

what is the output of:

lsb_release -a; uname -a

Thanks

Avin (avinashub211) said : #3

$ lsb_release -a; uname -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.4 LTS
Release: 14.04
Codename: trusty
Linux ubuntu 4.2.0-27-generic #32~14.04.1-Ubuntu SMP Fri Jan 22 15:32:27 UTC 2016 i686 i686 i686 GNU/Linux

Best Manfred Hampl (m-hampl) said : #4

You are running Ubuntu 14.04 trusty.

For this release the standard Ubuntu repositories currently contain:

openjdk-6-* 6b39-1.13.11-0ubuntu0.14.04.1
openjdk-7-* 7u101-2.6.6-0ubuntu0.14.04.1

You can install the newest available versions with commands like

sudo apt-get install openjdk-6-jdk
or
sudo apt-get install openjdk-7-jdk

There is no need to provide a version number to get the newest version downloaded and installed

If you want openjdk-8 for trusty you can refer to PPAs, see https://launchpad.net/ubuntu/+ppas?name_filter=openjdk-8 for a list of candidates

There is also Oracle Java here:
http://www.webupd8.org/2012/09/install-oracle-java-8-in-ubuntu-via-ppa.html?m=1

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer

Super simple.

Avin (avinashub211) said : #6

Thanks Manfred Hampl, that solved my question.