devcontainers / devcontainers/templates
java template does not set JAVA_HOME correct
- Dominant language
- Shell
- Stars
- 1.4k
- Forks
- 393
- Avg merge
- 2h 3m
- Merged PRs (30d)
- 1
Description
The template uses ms openjdk and adds support for mvn and gradle via the java feature.
```
{
"name": "Java",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/java:1-21-bullseye",
"features": {
"ghcr.io/devcontainers/features/java:1": {
"version": "none",
"installMaven": "true",
"installGradle": "true"
}
}
}
```
The container than has JAVA_HOME pointing to `/usr/local/sdkman/candidates/java/current` which does not exist.
MS jdk is installed at `/usr/lib/jvm/msopenjdk-current/bin/java`
```
$ mvn
The JAVA_HOME environment variable is not defined correctly,
this environment variable is needed to run this program.
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.