1

Im having a issue with Visual studio code in using some of the Java features.

For example, i can't use some of its feature: (i) "Java: Clean Java Language Server Workspace" (ii) In "Java: Create java project", after configuring the project, it doesn't pop anymore a windows suggesting changing folder;

(iii) If i adjust something in the pom.xml, like the from the default 1.8 to the current 18 installed, even if a reload the vscode, it displays the following message: "Build path specifies execution environment JavaSE-1.8. There are no JREs installed in the workspace that are strictly compatible with this environment. " "The compiler compliance specified is 1.8 but a JRE 18 is used" Before, if i used the clean java language workspace, the project used to solve this issue.

I Can't seem to make this work. I think it has to do with some adjustment that i made in the settings.json:

"settingsSync.ignoredSettings": [],
"java.jdt.ls.java.home": "C:/Java/jdk-18.0.2.1",
"spring-boot.ls.java.home": "C:/Java/jdk-18.0.2.1",
"java.maven.downloadSources": true,
"java.eclipse.downloadSources": true,
"java.debug.settings.hotCodeReplace": "auto",
"java.debug.settings.console": "externalTerminal",
"java.configuration.runtimes": [{
      "name": "JavaSE-18",
      "path": "C:/Java/jdk-18.0.2.1",
      "default":  true
  }],

I appreciate any help.

0

2 Answers 2

1

Solved the issue by deleting the folder: Users\victor\AppData\Roaming\Code\User

After initializing VSCODE again the problem was fixed.

Sign up to request clarification or add additional context in comments.

Comments

0

I have been struggling with a similar problem where my workspace never initialised the Java project. It turned out to be a corrupted workspace, which was stored under AppData\Roaming\Code\User\workspaceStorage

I deleted all the folders under there (which loses the information on which files were open in the workspaces). This cleared the issue. If you can tell from the datetime of the folders under this location which one is the workspace that stopped working, you can just delete that one.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.