redhat-developer / redhat-developer/vscode-java

JDK config in both windows and linux

Open
#3,660 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
2.3k
Forks
546
Avg merge
20h 1m
Merged PRs (30d)
11

Description

I need to work both in windows and linux(such as archlinux),
So when I switch from windows to linux, I need to reconfig JDK path in settings.json config file,
but when I reswitch to windows, I need to change JDK config path to windows format again,
So do we have some kind of argument that both can config for linux and windows, such as:

/// JDK config for windows
"java.jdt.ls.androidSupport.enabled": "on",
"java.jdt.ls.java.home.windows": "D:\Program Files\Java\jdk-17",
"java.configuration.runtimes": [
{
"name": "JavaSE-17",
"path": "D:\Program Files\Java\jdk-17",
"default": true
}
],
/// JDK config for linux
"java.jdt.ls.java.home.linux": "/jdk-17",
"java.configuration.runtimes": [
{
"name": "JavaSE-17",
"path": "/jdk-17",
"default": true
}
],

and it will read current system os info and auto switch to corresponding configurations?
Can we?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing how the extension reads the settings.json entries for java.jdt.ls.java.home and java.configuration.runtimes. Done means Windows and Linux JDK paths can coexist and the configuration for the current operating system is selected automatically without manual edits.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, typescript, vscode
Domain
developer-experience, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.