You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bug: Gradle build error: Supplied javaHome is not a valid folder. You supplied: /usr/local/sdkman/candidates/java/current #1405
Hi Philip Wedemann (@hfhbd), I'm an AI Support assistant here to help with your issue. While the team reviews your request, I wanted to provide some possible tips and documentation that might help you in the meantime.
• Override the Gradle JVM Home in your workspace settings so the extension picks a folder Gradle can validate. In .devcontainer/devcontainer.json (or .vscode/settings.json) add:
• See a similar report where overriding java.import.gradle.java.home fixed the “invalid javaHome” error:
• “The supplied javaHome seems to be invalid. I cannot find the java executable…” (#1325) microsoft/vscode-gradle#1325
labels:
bug
duplicateUrls: []
The team will respond to your issue shortly. I hope these suggestions are helpful in the meantime. If this comment helped you, please give it a 👍. If the suggestion was not helpful or incorrect, please give it a 👎. Your feedback helps us improve!
While this did get the variable to be the correct value, gradle did not respect or use it.
A solution that worked for me was to specify version,
"image": "mcr.microsoft.com/devcontainers/java:3-25-trixie",
"ghcr.io/devcontainers/features/java:1": {
"version": "25", // Set this to "none" to get the same gradle error
"installMaven": "false",
"installGradle": "true"
}
This got me the sdkman version which gradle wanted.
Activity
github-actions commentedon Sep 15, 2025
Hi Philip Wedemann (@hfhbd), I'm an AI Support assistant here to help with your issue. While the team reviews your request, I wanted to provide some possible tips and documentation that might help you in the meantime.
• Override the Gradle JVM Home in your workspace settings so the extension picks a folder Gradle can validate. In .devcontainer/devcontainer.json (or .vscode/settings.json) add:
Adjust the path to the actual JDK folder if
/currentis a broken symlink (e.g./usr/local/sdkman/candidates/java/21.0.x-temurin).• As an alternative, set the Gradle property in gradle.properties:
org.gradle.java.home=/usr/local/sdkman/candidates/java/current• See a similar report where overriding java.import.gradle.java.home fixed the “invalid javaHome” error:
• “The supplied javaHome seems to be invalid. I cannot find the java executable…” (#1325)
microsoft/vscode-gradle#1325
labels:
duplicateUrls: []
The team will respond to your issue shortly. I hope these suggestions are helpful in the meantime. If this comment helped you, please give it a 👍. If the suggestion was not helpful or incorrect, please give it a 👎. Your feedback helps us improve!
Uplink036 commentedon Mar 24, 2026
Maybe this will help future travels of this road, do note my problem was with java feature instead of just java base image.
In my search I found a similar response to the AI, albeit slightly different. the human response was this:
That specific path one could get by running
which javawhich returned$which java /usr/lib/jvm/msopenjdk-current/bin/javaWhile this did get the variable to be the correct value, gradle did not respect or use it.
A solution that worked for me was to specify version,
This got me the sdkman version which gradle wanted.
Simillar issue on the devcontainer java feature side.