# Install-jdk.sh changes

**URL:** <https://travis-ci.community/t/install-jdk-sh-changes/472>\
**Category:** Linux\
**Created:** [October 23, 2018, 7:41pm UTC](https://travis-ci.community/t/install-jdk-sh-changes/472 "2018-10-23T19:41:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![briandealwis](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/briandealwis/32/255_2.png) [@briandealwis](https://travis-ci.community/u/briandealwis)\
**Post date:** [October 23, 2018, 7:41pm UTC](https://travis-ci.community/t/install-jdk-sh-changes/472/1 "2018-10-23T19:41:58Z")

</div>

We have a cron build that just failed due to a change in how `openjdk11` is installed. Previously the JDK was installed into `/home/travis/openjdk11`, but now it seems to be installed into `/home/travis/jdk`. This change broke our build as we use Maven Toolchains and we must hardcode these paths.

I found that there were some _java adjustments_ [made](https://github.com/travis-ci/travis-build/pull/1533) and [reverted](https://github.com/travis-ci/travis-build/pull/1547). I’m hoping this will restore the previous behaviour.

Is there somewhere where this change should be listed or discussed? There’s no mention here nor on changelog dot travis-ci dot com.

Brian.

---

<div class="post-metadata">

**Author:** ![joepvd](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/joepvd/32/98_2.png) [@joepvd](https://travis-ci.community/u/joepvd)\
**Post date:** [October 24, 2018, 5:51am UTC](https://travis-ci.community/t/install-jdk-sh-changes/472/2 "2018-10-24T05:51:49Z")

</div>

Would be curious to learn why the path to the java binary needs to be hard coded. Could you share a link to a build log?

---

<div class="post-metadata">

**Author:** ![briandealwis](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/briandealwis/32/255_2.png) [@briandealwis](https://travis-ci.community/u/briandealwis)\
**Post date:** [October 24, 2018, 3:06pm UTC](https://travis-ci.community/t/install-jdk-sh-changes/472/3 "2018-10-24T15:06:15Z")

</div>

[Maven Toolchains](https://maven.apache.org/guides/mini/guide-using-toolchains.html) provides a way to select an tool implementation based on properties. It’s most commonly used to describe properties like the vendor and version of a JDK or JRE. Toolchains support is used through Maven to allow compiling and execution against a different JDK than being used by Maven. Very useful to ensure you don’t accidentally pull in dependencies built with incompatible Java 11’isms.

For Eclipse/OSGi projects, we add more detail to the toolchains.xml file to record the Java Executable Environment, such as `JavaSE-1.8` or `JavaSE-11, or`CDC-1.1/Foundation-1.1` (for mobile environments).

Brian.
