Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Couldn't start client Language Support for Java (Syntax Server) #1588

Closed
Lennerados opened this issue Aug 21, 2020 · 11 comments
Closed

Couldn't start client Language Support for Java (Syntax Server) #1588

Lennerados opened this issue Aug 21, 2020 · 11 comments

Comments

@Lennerados
Copy link

I have just freshly installed VS Code 1.48.1 and installed the extension "Language support for Java by Red Hat" (https://marketplace.visualstudio.com/items?itemName=redhat.java). But if I now open a Java directory, it shows two error messages: Couldn't start client Language Support for Java (Syntax Server) and Couldn't start client Language Support for Java.
Next to that the cpu usage also jumps to 100% and the spinning circle in the bottom right does not stop spinning. If I open the developer tools, I get about 1000 errors/second which all look like this:

[[object Object]]Internal error.
Error: Internal error.
	at c:\Users\my_computer\.vscode\extensions\redhat.java-0.65.0\dist\extension.js:1:76457
	at c:\Users\my_computer\.vscode\extensions\redhat.java-0.65.0\dist\extension.js:1:76751
	at Immediate.<anonymous> (c:\Users\my_computer\.vscode\extensions\redhat.java-0.65.0\dist\extension.js:1:77112)
	at processImmediate (internal/timers.js:439:21)

as well as a warning for each error:

rejected promise not handled within 1 second: Error: Internal error.
stack trace: Error: Internal error.
	at c:\Users\my_computer\.vscode\extensions\redhat.java-0.65.0\dist\extension.js:1:76457
	at c:\Users\my_computer\.vscode\extensions\redhat.java-0.65.0\dist\extension.js:1:76751
	at Immediate.<anonymous> (c:\Users\my_computer\.vscode\extensions\redhat.java-0.65.0\dist\extension.js:1:77112)
	at processImmediate (internal/timers.js:439:21)
What I have tried to fix it:
  1. Checked the JAVA_HOME of both the WSL 2 system I am using as well as the windows environmental variable (what was suggested in many other issues with the same. But I think they are correct: C:\Users\my_computer>echo %JAVA_HOME% C:\Program Files\Java\jdk-14.0.2
    I have also added "java.home" with the same location to the preferences, but that didn't fix it either.
  2. Clean install of VS Code and the extension
  3. Run VS Code as administrator
Environment
  • Operating System: Windows 10
  • JDK version: openjdk version "14.0.2" 2020-07-14, OpenJDK Runtime Environment (build 14.0.2+12-46), OpenJDK 64-Bit Server VM (build 14.0.2+12-46, mixed mode, sharing) (from https://jdk.java.net/14/)
  • Visual Studio Code version: 1.48.1
  • Java extension version: 0.65.0
Steps To Reproduce
  1. Install newest version of VS Code
  2. Install Java Red Hat Extension
  3. Open a Java Project with VS Code
Current Result

See above

Expected Result

No errors

@mhtun
Copy link

mhtun commented Oct 1, 2020

I'm running into the same issue. Running vscodium, windows 10
image

@djkong7
Copy link

djkong7 commented Oct 2, 2020

Based on conversations in #785, I had this same error when opening a project that was in WSL 2 (\\wsl$). Moving the project to some directory in windows (C:\) solved my issue.

I was able to get my project working while leaving it in WSL by using Remote development in WSL (https://code.visualstudio.com/docs/remote/wsl-tutorial)

@Lennerados
Copy link
Author

Thanks for the answer, djkong7, that fixed it for me as well. I think this issue can be close then.

@peschue
Copy link

peschue commented Feb 18, 2021

I was not able to get this to work using WSL with Remote development - @djkong7 could you give some hints which steps you followed to achieve this? I set the JDK path in my workspace file, opened the workspace from WSL2, and still the extension cannot load the java support and displays many errors in the console.

@djkong7
Copy link

djkong7 commented Feb 19, 2021

@peschue Can you confirm that the extension is properly recognizing the JDK. Try opening the command palette and run "Java: Configure Java Runtime". You should see your JDK under "Installed JDKs" as well as ensure that the Java Language Server is running JDK 11+ under "Java Tooling Runtime". I personally didn't have to do more steps other than that to get my project working in WSL2.

@peschue
Copy link

peschue commented Feb 22, 2021

"Java: Configure Java Runtime" causes spinning arrows in the status bar "Activating Extensions" and then nothing happens.

@jameyg42
Copy link

@peschue i initially had the same problem, but then i realized i only had a JRE installed in WSL. Installing a full JDK and restarting corrected my issues (sudo apt install openjdk-11-jdk-headless).

@NirmalSilwal
Copy link

getting similar issue in Mac

@lucasmrMM
Copy link

Make sure you have opened a WSL window in VSCode:

image

I was having the same problem time and again, until I somehow remembered I needed to open a WSL window. It lets VSCode take control in a different environment. I started to have this issue because one day I closed every VSCode window I had, and when I opened a new one the next day it started in a Windows 10 window by default which, by the way, works but has a collision with the "Language Support for Java" extension when it comes to Java projects.

@swapnilxi
Copy link

"Java: Configure Java Runtime" causes spinning arrows in the status bar "Activating Extensions" and then nothing happens.

yes, I am facing the same issue

@ColaQAQ1024
Copy link

I install a older extension.Then I just clean the work field and restart the VScode this question was solved.But I still don't understand the specific reason. I hope my solution will be helpful to you !😎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants