redhat-developer / redhat-developer/vscode-java
JRE path as environment variable
还没有人认领这个 Issue。
- 主要语言
- TypeScript
- 星标
- 2.3k
- 派生
- 546
- 平均合并
- 20 小时 1 分钟
- 30 天内合并 PR
- 11
描述
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.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先检查扩展的环境变量或配置入口,以及其 JRE 路径的组装方式。检查 issue 中描述的 devcontainer.json 和 settings.json 使用场景,包括 Windows 和 macOS 架构。当存在一种有文档说明的跨平台方式来引用扩展的 JRE 路径,且无需硬编码其已安装版本或目录时,即视为完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- java, typescript
- 领域
- developer-experience, tooling
- Issue 类型
- 功能
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100