skip to Main Content

All of sudden when I open project with visual studio code, it shows error.

The java.jdt.ls.java.home variable defined in Visual Studio Code settings points to a missing or inaccessible folder (/Users/hayat/Library/Application Support/Code/User/globalStorage/pleiades.java-extension-pack-jdk/java/17)

When I open settings.json, it shows below.

"java.configuration.runtimes": [
    {
      "name": "JavaSE-1.8",
      "path": "/Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/Contents/Home"
    },
    {
      "name": "JavaSE-11",
      "path": "/Library/Java/JavaVirtualMachines/zulu-11.jdk/Contents/Home"
    },
    {
      "name": "JavaSE-17",
      "path": "/Users/hayat/Library/Application Support/Code/User/globalStorage/pleiades.java-extension-pack-jdk/java/17",
      "default": true
    },
    {
      "name": "JavaSE-20",
      "path": "/Users/hayat/Library/Application Support/Code/User/globalStorage/pleiades.java-extension-pack-jdk/java/20"
    }
  ],

I can’t find pleiades.java-extension-pack-jdk in globalStorage folder from finder.

enter image description here

I installed openjdk@17 but still this file doesn’t exist.

brew install openjdk@17

I didn’t see this error before, but all of sudden it appears.

How to resolve this issue?

2

Answers


  1. Your Java 17 path is no longer valid.You need to change the path to the new location.If you are running MacOS on Apple Silicon Mac the java path for brew install openjdk@17 should be:

    /Library/Java/JavaVirtualMachines/openjdk-17.jdk/Contents/Home/bin/java

    Login or Signup to reply.
  2. Its globalStorage folder is provided by the VSCode extension Extension Pack for Java Auto Config. Install this extension.

    https://marketplace.visualstudio.com/items?itemName=Pleiades.java-extension-pack-jdk

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search