Support for multiple Java versions on the same Nomad client
- Dominant language
- Go
- Stars
- 17k
- Forks
- 2.1k
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 105
Description
### Proposal
Current implementation of the java driver checks the support for java [by auto-detecting the executable via `PATH`](https://github.com/hashicorp/nomad/blob/894c2e61dd03c9fad460d64a130dab807c4e428b/drivers/java/driver.go#L449).
It should be possible to have multiple java versions installed on the same Nomad client.
### Use-cases
I am developing software that needs to support multiple versions of java or the JDK itself. Right now I have multiple JDKs installed on my local developer system, but I want to have my Nomad client able to target all the installed JDKs, not only the one found in my PATH. As JDK and JRE behave different (due to different bundled stuff), it would speed up my development process by having several instances of my software with all kinds of Java versions.
### Attempted Solutions
Make it possible to provide several paths via configuration when starting the nomad agent (in addition to the auto-detected one, with being able to disable auto-detection). It even would make it possible to select the java executable on the agent when a different java executable is configured via PATH.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in drivers/java/driver.go around the PATH-based executable detection described in the issue, then trace how Java driver configuration is supplied when the Nomad agent starts. Define how multiple Java paths, optional auto-detection, and selecting a configured executable should work; done means one client can target multiple installed Java versions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, java
- Domain
- devops, infrastructure
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100