# Openjdk6 no longer installs on trusty

**URL:** <https://travis-ci.community/t/openjdk6-no-longer-installs-on-trusty/4056>\
**Category:** Linux\
**Created:** [July 3, 2019, 2:18pm UTC](https://travis-ci.community/t/openjdk6-no-longer-installs-on-trusty/4056 "2019-07-03T14:18:33Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![davecramer](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/davecramer/32/2148_2.png) [@davecramer](https://travis-ci.community/u/davecramer)\
**Post date:** [July 3, 2019, 2:18pm UTC](https://travis-ci.community/t/openjdk6-no-longer-installs-on-trusty/4056/1 "2019-07-03T14:18:33Z")

</div>

[https://travis-ci.org/pgjdbc/pgjdbc-jre6/jobs/553763575](https://travis-ci.org/pgjdbc/pgjdbc-jre6/jobs/553763575)

---

<div class="post-metadata">

**Author:** ![jayvdb](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/jayvdb/32/1966_2.png) [@jayvdb](https://travis-ci.community/u/jayvdb)\
**Post date:** [July 3, 2019, 3:01pm UTC](https://travis-ci.community/t/openjdk6-no-longer-installs-on-trusty/4056/2 "2019-07-03T15:01:16Z")

</div>

See [Install-jdk.sh failing for openjdk9 and 10](https://travis-ci.community/t/install-jdk-sh-failing-for-openjdk9-and-10/3998/21) ; very likely to be the same set of problems caused by [https://github.com/travis-ci/travis-cookbooks/issues/976](https://github.com/travis-ci/travis-cookbooks/issues/976) , as best I can tell what is happening.

---

<div class="post-metadata">

**Author:** ![davecramer](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/davecramer/32/2148_2.png) [@davecramer](https://travis-ci.community/u/davecramer)\
**Post date:** [July 3, 2019, 3:42pm UTC](https://travis-ci.community/t/openjdk6-no-longer-installs-on-trusty/4056/3 "2019-07-03T15:42:00Z")

</div>

Ya except I am able to get JDK7 to install here [https://travis-ci.org/pgjdbc/pgjdbc-jre7/jobs/553783431](https://travis-ci.org/pgjdbc/pgjdbc-jre7/jobs/553783431)

Is there a long term solution to this?

---

<div class="post-metadata">

**Author:** ![jayvdb](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/jayvdb/32/1966_2.png) [@jayvdb](https://travis-ci.community/u/jayvdb)\
**Post date:** [July 3, 2019, 4:04pm UTC](https://travis-ci.community/t/openjdk6-no-longer-installs-on-trusty/4056/4 "2019-07-03T16:04:39Z")

</div>

jdk7 and 8 are the only versions which have been stable for me over the last few weeks. (but I havent been using 13+)

which is a bit ironic because the installer script seems to only be CI tested on jdk9+

I guess the installer script will be enhanced soon, or an alternative implemented.

---

<div class="post-metadata">

**Author:** ![native-api](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/native-api/32/430_2.png) [@native-api](https://travis-ci.community/u/native-api)\
**Post date:** [July 3, 2019, 4:15pm UTC](https://travis-ci.community/t/openjdk6-no-longer-installs-on-trusty/4056/5 "2019-07-03T16:15:57Z")

</div>

As per [The Trusty Build Environment - Travis CI](https://docs.travis-ci.com/user/reference/trusty#jvm-clojure-groovy-java-scala-images) , you need to install OpenJDK 6 with `apt`:

> OpenJDK 6 is not installed. To use OpenJDK 6, install [`openjdk-6-jdk` package](https://packages.ubuntu.com/trusty/openjdk-6-jdk). For example, using [`apt` addon](https://docs.travis-ci.com/user/installing-dependencies/):
> 
> ```auto
> addons:
> apt:
> packages:
> - openjdk-6-jdk
> jdk: openjdk6
> 
> ```

---

<div class="post-metadata">

**Author:** ![davecramer](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/davecramer/32/2148_2.png) [@davecramer](https://travis-ci.community/u/davecramer)\
**Post date:** [July 3, 2019, 4:29pm UTC](https://travis-ci.community/t/openjdk6-no-longer-installs-on-trusty/4056/6 "2019-07-03T16:29:51Z")

</div>

This has worked flawlessly up until the recent removal of Oracle jdk’s without apt packages

---

<div class="post-metadata">

**Author:** ![jayvdb](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/jayvdb/32/1966_2.png) [@jayvdb](https://travis-ci.community/u/jayvdb)\
**Post date:** [July 3, 2019, 4:37pm UTC](https://travis-ci.community/t/openjdk6-no-longer-installs-on-trusty/4056/7 "2019-07-03T16:37:04Z")

</div>

It is my experience that everything on [docs.travis-ci.com](http://docs.travis-ci.com) wrt JDKs is outdated and mostly is incorrect due to [https://github.com/travis-ci/travis-cookbooks/issues/976](https://github.com/travis-ci/travis-cookbooks/issues/976) . “In flux” seems to be the current situation. The big O company gets some of the blame, but it has been in the pipes for a long time.

---

<div class="post-metadata">

**Author:** ![native-api](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/native-api/32/430_2.png) [@native-api](https://travis-ci.community/u/native-api)\
**Post date:** [July 3, 2019, 4:54pm UTC](https://travis-ci.community/t/openjdk6-no-longer-installs-on-trusty/4056/8 "2019-07-03T16:54:09Z")

</div>

> [@davecramer](#):
>
> This has worked flawlessly up until the recent removal of Oracle jdk’s without apt packages

According to [the build history](https://travis-ci.org/pgjdbc/pgjdbc-jre6/builds), the [last successful build](https://travis-ci.org/pgjdbc/pgjdbc-jre6/builds/259888467) is dated 01.08.2017 and was run in the Precise environment. [The last successful PR build](https://travis-ci.org/pgjdbc/pgjdbc-jre6/builds/553786897) installs the `apt` package manually.

---

<div class="post-metadata">

**Author:** ![davecramer](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/davecramer/32/2148_2.png) [@davecramer](https://travis-ci.community/u/davecramer)\
**Post date:** [July 3, 2019, 5:09pm UTC](https://travis-ci.community/t/openjdk6-no-longer-installs-on-trusty/4056/9 "2019-07-03T17:09:16Z")

</div>

It’s not even supposed to work at all in precise.  
The most recent build does install it manually just so I could get it working.

I agree “in flux” seems to be correct.

---

<div class="post-metadata">

**Author:** ![dialex](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/dialex/32/3047_2.png) [@dialex](https://travis-ci.community/u/dialex)\
**Post date:** [November 3, 2019, 8:14pm UTC](https://travis-ci.community/t/openjdk6-no-longer-installs-on-trusty/4056/10 "2019-11-03T20:14:29Z")

</div>

Any update on this? I’m using this code, which I took from the [Travis’ official doc](https://docs.travis-ci.com/user/reference/trusty/#jvm-clojure-groovy-java-scala-images):

```auto
dist: trusty
language: java

addons:
  apt:
    packages:
      - openjdk-6-jdk
jdk:
  - openjdk6

```

and my build fails during setup saying `install-jdk.sh Expected feature release number in range of 9 to 14, but got: 6` [(build job)](https://travis-ci.org/dialex/JCDP/jobs/606841177)

Am I doing something wrong? How can I use Java 6 on Travis?
