# Could not determine java version

**URL:** <https://discuss.gradle.org/t/could-not-determine-java-version/30331>\
**Category:** Help/Discuss\
**Tags:** eclipse\
**Created:** [January 26, 2019, 6:06pm UTC](https://discuss.gradle.org/t/could-not-determine-java-version/30331 "2019-01-26T18:06:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thad\_Humphries](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/thad_humphries/32/7450_2.png) [@Thad\_Humphries](https://discuss.gradle.org/u/Thad_Humphries)\
**Post date:** [January 26, 2019, 6:06pm UTC](https://discuss.gradle.org/t/could-not-determine-java-version/30331/1 "2019-01-26T18:06:24Z")

</div>

I am trying to build several older projects in Eclipse 2018-12 (4.10.0) with the the Gradle wrapper. All these projects use Gradle 2.14.1. My JAVA\_HOME is set for Java 8, using Amazon Corretto 1.8.0\_202-b08. Everything is fine from the command line. However from Eclipse I get the error

```
Could not create an instance of Tooling API implementation using the specified Gradle distribution 'https://services.gradle.org/distributions/gradle-2.14.1-all.zip'.
Could not create service of type FileWatcherFactory using GlobalScopeServices.createFileWatcherFactory().
Could not determine java version from '11.0.1'.

```

Buildship 3.0.1v20181217-1554 is installed. I have tried both gradle-2.14.1-all.zip and gradle-2.14.1-bin.zip

Yes, Java 11.0.1 is also installed, but it is _not_ JAVA\_HOME or in the PATH (or even set in this Eclipse workspace). Everything in this workspace is Java 8, usually targeting Java 6 or 7.

Is Gradle forcing an upgrade to or an uninstall of Java 11? Java 11 is needed for other things, but we have _no interest_ in moving these projects to it now that Amazon has stepped up to supporting Java 8. Likewise we have _no interest_ in moving these projects to a newer wrapper. We went through too much pain trying to keep up with 2.X and all that broke at it changed to suddenly jump to v4 or v5.

---

<div class="post-metadata">

**Author:** ![Lance](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/lance/32/787_2.png) [@Lance](https://discuss.gradle.org/u/Lance)\
**Post date:** [January 26, 2019, 7:55pm UTC](https://discuss.gradle.org/t/could-not-determine-java-version/30331/2 "2019-01-26T19:55:42Z")

</div>

Here’s the oldest version of JavaVersion.java that I could find on github

> <https://github.com/gradle/gradle/blob/v3.0.0/subprojects/base-services/src/main/java/org/gradle/api/JavaVersion.java#L93>

You might be able to fool gradle into thinking you’re on an older version of java by passing

`-Djava.version=1.9`

Warning: Its quite possible that your old version of Gradle won’t work with java 11. It might be time to upgrade
