redhat-developer / redhat-developer/vscode-java
JRE path as environment variable
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.3k
- Forks
- 546
- Avg merge
- 20h 1m
- Merged PRs (30d)
- 11
Description
Hello, is there an environment variable to get the full JRE path for the extension? Specifically, when referencing from a devcontainer.json or settings.json file. Below is a path I'm talking about.
.vscode-server/extensions/redhat.java-1.40.0-linux-x64/jre/21.0.6-linux-x86_64/
For reference, I am creating a Dev Container for my team, which are using different OSs. The container will be using an older JRE version that some plugins won't support. I want to be able to reference the vscode-java JRE path in different settings without having to figure out the path after install.
For example, I am using Redhat's Community Server Connectors. In it, I have to define the java home rsp-ui.rsp.java.home. Currently, I pass the following if a user is on Windows
"rsp-ui.rsp.java.home": "/home/${localEnv:USERNAME}/.vscode-server/extensions/redhat.java-1.40.0-linux-x64/jre/21.0.6-linux-x86_64/"
but on Macs I have to do
"rsp-ui.rsp.java.home": "/home/${localEnv:USER}/.vscode-server/extensions/redhat.java-1.40.0-linux-arm64/jre/21.0.6-linux-aarch64/"
If there's a way to get that path without having to look it up, it'd be very useful.
Contributor guide
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
Start by reviewing the extension's environment-variable or configuration entry points and how its JRE path is assembled. Check the devcontainer.json and settings.json use cases described in the issue, including Windows and macOS architectures. Done means a documented, cross-platform way to reference the extension's JRE path without hard-coding its installed version or directory.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, typescript
- Domain
- developer-experience, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100