devcontainers / devcontainers/features

Java feature: support multiple Java versions

Open
#599 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Shell
Stars
1.5k
Forks
621
Avg merge
2d 11h
Merged PRs (30d)
4

Description

Most of the times developer needs multiple Java versions to be installed, e.g. Java 17 is required for a Spring Tools Language Server and app itself may require Java 11.
There must be a way to achieve that with "ghcr.io/devcontainers/features/java:1" feature.
Currently following workaround works:
```
// Java 11 is required for a "Community Server Connector" (Tomcat)
"ghcr.io/devcontainers-contrib/features/tomcat-sdkman:2": {
"version": "8.5.89", // https://tomcat.apache.org/whichversion.html
"jdkVersion": "11",
"jdkDistro": "zulu"
},
// Java 17 is required for a Spring Tools Language Server
"ghcr.io/devcontainers/features/java:1": {
"version": "17",
"jdkDistro": "zulu",
"installMaven": "true",
"mavenVesion": "3.9.3" // https://maven.apache.org/docs/history.html
}
```
But it would be great to install multiple Java versions without installing a Tomcat. Selecting a default Java version will be also very helpful.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.