microsoft / microsoft/vscode-java-pack
Bug: Gradle build error: Supplied javaHome is not a valid folder. You supplied: /usr/local/sdkman/candidates/java/current
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 352
- Forks
- 166
- Avg merge
- 17h 47m
- Merged PRs (30d)
- 32
Description
Environment:
- VS Code Version: 1.97.2
- Extension Version: 3.16.4
- JDK Type & Version: temurin, 21
- OS Type & Version: Linux
Step to Reproduce:
Use devcontainer (GitHub Codespaces)
{
"image": "mcr.microsoft.com/devcontainers/java:21"
}
with a Gradle project
For example use this project: https://github.com/hfhbd/mavencentral and open it with GitHub Codespaces
Expected Behavior:
No issue when opening the Gradle project
Actual Behavior:
[info] [gradle-server] Gradle Server started, listening on 38591
[info] Gradle client connected to server
[info] [gradle-server] Downloading https://services.gradle.org/distributions/gradle-8.13-milestone-3-bin.zip
[info] [gradle-server] ...
[info] [gradle-server] ....
[info] [gradle-server] ..
[info] [gradle-server] ...
[info] Java Home: /usr/local/sdkman/candidates/java/current
[info] JVM Args: -Xmx2048m,-Dfile.encoding=UTF-8,-Duser.country=US,-Duser.language=en,-Duser.variant
[info] Gradle User Home: /home/vscode/.gradle
[info] Gradle Version: 8.13-milestone-3
[error] Error getting build for /workspaces/mavencentral: Supplied javaHome is not a valid folder. You supplied: /usr/local/sdkman/candidates/java/current
Related Issues:
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure with the provided Java 21 devcontainer and the linked mavencentral Gradle project in GitHub Codespaces. Start from the Gradle server log and trace how /usr/local/sdkman/candidates/java/current is selected; done means the project opens without the invalid javaHome error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, typescript
- Domain
- build-system, developer-experience
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100