Home > Net >  IIntelliJ Gradle sync failed: The supplied javaHome seems to be invalid. I cannot find the java exec
IIntelliJ Gradle sync failed: The supplied javaHome seems to be invalid. I cannot find the java exec

Time:06-15

Recently my organization has changed the jdk from Adopt to Adoptium. Since then , my Intellij is not working.

Error:-

Gradle sync failed: The supplied javaHome seems to be invalid. I cannot find the java executable. Tried location: C:\Program Files\AdoptOpenJDK\jdk-8.0.282.8-hotspot\bin\java.exe

  1. I have changed the JDK version in settings -> Build -> Gradle -> Changed the version to 1.8.0_332.
  2. In JAVA_HOME (System Env Varaiable )= C:\Program Files\Eclipse Adoptium\jdk-8.0.332.9-hotspot\
  3. In CMD - Java Version is openjdk version "1.8.0_332" OpenJDK Runtime Environment (Temurin)(build 1.8.0_332-b09) OpenJDK 64-Bit Server VM (Temurin)(build 25.332-b09, mixed mode)

I have restarted my Intellij and machine multiple times. Still the error is not going away.

CodePudding user response:

  1. Download gradle zip file from enter image description here

  • Related