Skip to content

Runtime at '/home/user/.sdkman/candidates/java/21.ea.28-open' is not compatible with the 'JavaSE-21' environment" #3177

@GavinRay97

Description

@GavinRay97
Environment
  • Operating System: WSL2 Fedora Rawhide
  • JDK version: 21.ea.28-open
  • Visual Studio Code version:
Version: 1.80.0-insider (user setup)
Commit: c1bca6d7cc2c5f71ae04deda90c0cf50819ffde4
Date: 2023-06-29T07:44:44.659Z
Electron: 22.3.14
ElectronBuildId: 21893604
Chromium: 108.0.5359.215
Node.js: 16.17.1
V8: 10.8.168.25-electron.0
OS: Windows_NT x64 10.0.22631
  • Java extension version: v1.21.2023063004 Pre-Release
Steps To Reproduce

Configure .vscode/settings.json like below:

{
    "java.jdt.ls.java.home": "/home/user/.sdkman/candidates/java/21.ea.28-open",
    "java.configuration.runtimes": [
        {
            "name": "JavaSE-21",
            "path": "/home/user/.sdkman/candidates/java/21.ea.28-open",
            "default": true
        }
    ]
}
Current Result
[Error - 5:09:27 PM] Jun 30, 2023, 5:09:27 PM Runtime at '/home/user/.sdkman/candidates/java/21.ea.28-open' is not compatible with the 'JavaSE-21' environment
[Trace - 5:09:27 PM] Received notification 'telemetry/event'.
Params: {
    "name": "java.ls.error",
    "properties": {
        "message": "Runtime at '/home/user/.sdkman/candidates/java/21.ea.28-open' is not compatible with the 'JavaSE-21' environment"
    }
}
Expected Result

It works

Additional Informations

Setting name to JavaSE-20 makes it work

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions