Could not determine Java version using executable C:\Program Files\Java\jdk-10.0.1\bin\java.exe

Could not determine Java version using executable C:\Program Files\Java\jdk-10.0.1\bin\java.exe.

This error appeared when I tried to create a new project in IntelliJ IDEA Version 2018.1.2 with Gradle. It said:

sync failed: Could not determine Java version using executable C:\Program Files\Java\jdk-10.0.1\bin\java.exe

==================

I fixed the problem by uninstalling jdk 10 and installing jdk8.

For JDK 10 you will need Gradle 4.7+ which is not used by default in IntelliJ IDEA (current version IntelliJ IDEA 2018.1.4).

To fix this issue install latest Gradle for your OS (Install guide). For MacOS you can use Homebrew:

brew install gradle

Go to your project directory:

cd ~/path/to/your/project/

Generate Gradle Wrapper script with the version you installed (in my case it is 4.8):

gradle wrapper --gradle-version 4.8

This command is going to download Gradle 4.8, create scripts gradlew and gradlew.bat for your current project. From this point, you should use these scripts in the command-line.

Next step, is to make sure that IntelliJ IDEA uses those, instead of built-in Gradle distribution and you can do this by opening IntelliJ preferences and search for "gradle" (this will be in "Build, Execution, Deployment / Build Tools / Gradle").

In this section of the settings select:

Select "Use gradle ‘wrapper’ task configuration"

Apply changes, press ok and re-build (re-sync) Gradle and everything should be fine. I hope this helps.

Could not determine Java version using executable (Java 10 build , Could not determine Java version using executable C:\Program Files\Java\jdk-​10.0.1\bin\java.exe. Follow. Answered. Avatar. Jack Waruingi. Could not determine Java version using executable C:\Program Files\Java\jdk-10.0.1\bin\java.exe. Follow

Below is what i did to solve this issue on Windows 10 with IntelliJ 2018.1.5 and Java 10.0.1 JDK

  1. Downloaded the new gradle version(latest is 4.8.1 at the time of this post) from: https://gradle.org/releases
  2. Followed the following steps mentioned at: https://gradle.org/install/

(i) Microsoft Windows users

Create a new directory C:\Gradle with File Explorer.

Open a second File Explorer window and go to the directory where the Gradle distribution was downloaded. Double-click the ZIP archive to expose the content. Drag the content folder gradle-4.8.1 to your newly created C:\Gradle folder.

(ii) Added PATH C:\Gradle\gradle-4.8.1\bin to environment variable

  1. After above went to File --> Settings-->Build Tools --> Gradle and did set Gradle home to C:/Gradle/gradle-4.8.1

  2. Then went to View --> Tool Windows --> Gradle and hit the Refresh all Gradle projects icon.

Error: "Could not determine Java version using executable /Library , Could not determine Java version using executable (Java 10 build 10+44) #4503 //def JAVAC="C:/java/jdk-10/bin/javac.exe" 16:47:43 wrong place, despite it does find the exact path: C:\Program Files\Java\jdk1.8.0_191\  Could not determine Java version using executable C:\Program Files\Java\jdk-10.0.1\bin\java.exe . Posted by: admin May 2, 2018 Leave a comment

Even if you're using Linux the solution remains the same.

Inside the root folder of your Project(Working Directory) >>

gradle/wrapper/

There's a file named >>

gradle-wrapper.properties

Change the distributionUrl line (Outdated Version):

distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-bin.zip

To the following distributionUrl (Compatible/Correct Version):

distributionUrl=https\://services.gradle.org/distributions/gradle-4.8-bin.zip 

Don't forget to configure IntelliJ IDEA Settings to use the Gradle-Wrapper Configurations.

Solving "Could not determine Java version" with Gradle and IntelliJ , Could not determine Java version using executable /Library/Java/​JavaVirtualMachines/jdk-10.0.1.jdk/Contents/Home/bin/java. Here is my  For JDK 10 you will need Gradle 4.7+ which is not used by default in IntelliJ IDEA (current version IntelliJ IDEA 2018.1.4). To fix this issue install latest Gradle for your OS ( Install guide ). For MacOS you can use Homebrew:

Trying to code Android on Intellij, getting error: "Could not determine , Solving “Could not determine Java version” with Gradle and IntelliJ on work and looking at the IntelliJ log files didn't gave me many clues. SDK you're currently using your project, it can be another version. Here click on SDKs and make sure that each Java JDK points to a valid folder. /usr/bin/env sh fig4: Select 10 (notice that the JDK home path contains java-1.11.0-openjdk-amd64) and press -button to remove 10. fig5: after removal of jdk-10 select jdk-8(named 1.8 in fig5) and press ok . fig6: Now go to File -> Settings -> Build, Execution, Deployment -> Build tools -> Gradle -> Gradle JVM and choose the same path that you have set as JDK home path while adding 1.8 in Project Structure and press Ok .

Going to:

File >> Settings >> Build, Execution, Deployment >> Build Tools >> Gradle

and selecting:

Use local gradle distribution

fixed it for me.

Could not determine Java version using executable C:\\Program , not determine Java version using executable C:\Program Files\Java\jdk-10.0.1\​bin\java.exe." I have trying to figure this one out for hours, but have no clue. Could not find org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.30 $ gradle build clean --stacktrace FAILURE: Build failed with an exception. What went wrong: A problem occurred configuring root project 'insight'. Could not resolve all files for configuration ':classpath'. Could not find org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.30.

How to fix Gradle 4.4/4.7 + JDK 10 issue on IntelliJ IDEA 2018.1.x , Could not determine Java version using executable C:\Program Files\Java\jdk-​10.0.1\bin\java.exe. This error appeared when I tried to create a new project in  If you’ve upgraded a JDK recently make sure to check that the SDK paths are correct. It doesn’t have to be the SDK you’re currently using your project, it can be another version. To do this on MacOSX press F4 at the project to go to its project structure settings. Here click on SDKs and make sure that each Java JDK points to a valid folder.

IntelliJ IDEA Gradle error, Hi there, a few days ago I tried to build a Kotlin project using the latest OpenJDK 10, and it Could not determine Java version using executable /// Gladly, it doesn't do that when running tests and building your software. > use Java that is compatible with Gradle 4.4 (do you really need Java 10?) That's what I ended up doing. I installed JDK 8 so intelliJ would set up the gradle project and download the wrapper. With that wrapper i could specify the version of gradle with the gradlew wrapper command and upgraded to 4.7.

Gradle Build Failed error, "Could not determine java version from , Could not determine java version from '9.0.1'. In order to solve this I pointed IntelliJ to my own gradle installation - instead of using the build in  ne pouvait pas déterminer la version Java en utilisant l'exécutable C:\Program fichiers\Java\jdk-10.0.1 \ bin \ java.EXE. cette erreur est apparue lorsque j'ai essayé de créer un nouveau projet dans IntelliJ IDEA Version 2018.1.2 avec Gradle.

Comments
  • github.com/gradle/gradle/issues/4503
  • reply to guleryuz: thank you, I fixed the problem by uninstalling jdk 10 and installing jdk8
  • In case the gradle wrapper script is already there, the upper command won't work. Instead you have to edit ~/path/to/your/project/gradle/wrapper/gradle-wrapper.properties and change the value of distributionUrl to https\://services.gradle.org/distributions/gradle-4.8-bin.zip.
  • This solved my issue. I was using idea plugin as a workaround using IDEA but somehow the autowiring and some configurations are not properly configured. After having the wrapper in my root project > import project > user gradle wrapper > everything works fine.
  • Thanks for the explanation, @idleherb. Upgrading to gradle 4.8 solved my issue ;-)
  • For a legacy project, which must be compiled with JDK 1.8, I need to open File, Project Structure..., then under Platform Settings, SDKs, remove the 11 item, using the + button. I'm using IntelliJ IDEA ULTIMATE 2018.3 under macOS Mojave 10.14.2.
  • This worked for me, OP did any of these answers work for you?
  • This is really awesome. Just open the URL services.gradle.org/distributions and find the latest version
  • At last, a decent answer! Thanks!
  • And I also had to disable offline mode.