2

I set up jdt.ls.java.home property in settings and I changed my JAVA_HOME environment variable properly, but my Gradle is throwing the error Could not run build action using connection to Gradle distribution:

[error] [gradle-server] Could not run build action using connection to Gradle distribution 'https://services.gradle.org/distributions/gradle-7.4-bin.zip'.
[error] Error getting build for c:\Users\NI3L3GAL\Desktop\Programowanie Nowy folder: Could not run build action using connection to Gradle distribution 'https://services.gradle.org/distributions/gradle-7.4-bin.zip".

There are also more errors:

Could not run phased build action using connection to Gradle distribution 'https://services.gradle.org/distributions/gradle-7.4-bin.zip.
The supplied javaHome seems to be invalid. I cannot find the java executable. Tried location: C:\Program Files\Eclipse Adoptiu... Java(0) [1,11
Could not run phased build action using connection to Gradle distribution 'https://services.gradle.org/distributions/gradle-7.4-bin.zip. The supplied javaHome seems to be invalid. I cannot find the java executable. Tried location: C:\Program Files\Eclipse Adoptiu... Java(0) [11]
0

1 Answer 1

3

You can specify a different Java home to Gradle via the User setting named java.import.gradle.java.home.

jdt.ls.java.home is used to launch the Java Language Server, and the extension had embedded a JRE to start the Java Language Server. So it doesn't matter, you can remove it.

And what's the value of C:\Programe Files\Eclipse Adoptiu..? please make sure it's an executable java path.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.