Skip to content

Issue with JDK version changed #1003

Closed
Closed

Description

@B1ex1ayU

I have installed JDK 12 before and the code can run well, but I need JDK 11 for some reason so I uninstall JDK12 and install JDK11. (and I have already changed the environment variable, JAVA_HOME to \jdk-11.0.4)

Then, my VScode can't run it...( I have tried to delete and create a new java file and run )
But it still works on cmd and Powershell with the right version of JDK.

微信截图_20190725152140

微信截图_20190725152531

Environment
  • Operating System: Windows 10
  • JDK version: 11.0.4
  • Visual Studio Code version: 1.36.1
  • Java extension version: 0.7.1
Steps To Reproduce
  1. [step 1] install JDK 12 and VScode and Java Extention (then everything works well)
  2. [step 2] uninstall JDK 12 and install JDK 11
  3. [step 3] change the environment variable
  4. [step 4] code can't run on VScode but can run on cmd

Activity

  1. testforstephen commented on Jul 25, 2019

    @testforstephen
    Collaborator

    Could you try VS Code command Java: Clean the Java language server workspace?

  2. B1ex1ayU commented on Jul 25, 2019

    @B1ex1ayU
    Author

    it works! thanks!! @testforstephen

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

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