HiveBrain v1.2.0
Get Started
← Back to all entries
patternMinor

Does Oracle have an API that shows the latest stable JDK version?

Submitted by: @import:stackexchange-devops··
0
Viewed 0 times
thelatestversionstablethatshowsdoesoracleapijdk

Problem

There is an ansible role that installs jdk8, but is incompatible with jdk9. The role parses a couple of html pages and the commands are incompatible with java9. It was quite hard to make it work for jdk9, and now the PR is broken for jdk8.

https://github.com/ansiblebit/oracle-java/issues/63

In order to prevent that a lot of work has to be done over and over again, it would be great if there is an API that shows the latest jdk version. Then this version could be used in the ansible role and then this will be more stable.

Solution

http://api.releasesoftwaremoreoften.com/latestversion?name=oraclejdk8
http://api.releasesoftwaremoreoften.com/latestversion?name=oraclejdk9

Running:

curl -s http://releasesoftwaremoreoften.com/latestversion?name=oraclejdk9 | jq .latestVersion


returns:

9.0.4


and

curl -s http://releasesoftwaremoreoften.com/latestversion?name=oraclejdk8 | jq .latestVersion


returns:

8u162

Code Snippets

curl -s http://releasesoftwaremoreoften.com/latestversion?name=oraclejdk9 | jq .latestVersion
curl -s http://releasesoftwaremoreoften.com/latestversion?name=oraclejdk8 | jq .latestVersion

Context

StackExchange DevOps Q#3443, answer score: 1

Revisions (0)

No revisions yet.