Skip to content

JDK config in both windows and linux #3660

Open
@petercao

Description

@petercao

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions