Visitar URL original
JDK Runtime in project settings always shows as jdk 21 while actual runtime isn't it · Issue #1443 · microsoft/vscode-java-pack · GitHub
Skip to content

JDK Runtime in project settings always shows as jdk 21 while actual runtime isn't it #1443

Description

@yuyully

Environment:

  • VS Code Version: 1.101.2
  • Extension Version: v0.29.2
  • JDK Type & Version: jdk-24
  • OS Type & Version: Windows

Step to Reproduce:

  1. Open a java project
  2. Open project settings > JDK Runtime

Expected Behavior:
JDK Runtime in project settings can show correctly without clean and restart.

Actual Behavior:
JDK Runtime in project settings always shows as jdk 21 while actual runtime isn't it. Clean workspace cache > Restart IDE > Then it can show correctly.
Image

Related Issues:

Activity

  1. github-actions commented on Sep 1, 2025

    @github-actions

    Hi Cindy Liu (@yuyully), I'm an AI Support assistant here to help with your issue. While the team reviews your request, I wanted to provide some possible tips and documentation that might help you in the meantime.

    Solution

    • Use the VS Code command “Java: Configure Java Runtime” to add your JDK 24 installation and mark it as default. This will update the list shown in Project Settings › JDK Runtime without needing to clear the cache.
    • Alternatively, set your JDK explicitly in settings.json:
      "java.configuration.runtimes": [
        {
          "name": "JavaSE-24",
          "path": "C:\\Program Files\\Java\\jdk-24.0.1",  // adjust to your install folder
          "default": true
        }
      ]
      Then reload the window to apply.

    Other references worth checking

    Other references with low confidence

    The team will respond to your issue shortly. I hope these suggestions are helpful in the meantime. If this comment helped you, please give it a 👍. If the suggestion was not helpful or incorrect, please give it a 👎. Your feedback helps us improve!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions