When I open a java project in VSCode and click on a .java file, I get the error - "Couldn't start client Java Language Server". Screenshot below -

I already have the JAVA_HOME environment variable set -

and also java.home set in VSCode user settings -

I also get additional errors, like "Classpath is incomplete". Even though I opened a complete intellij generated project and a netbeans generated project in 2 different windows.
I already have the JAVA_HOME environment variable set -
@Manish-Giri Could you try set JAVA_HOME to C:\Program Files\Java\jdk-11.0.1?
report any errors you see in the console
I'm having the same issues... here's my log
"java.home": "C:\Program Files\Java\jdk-11.0.2"
Path set to C:\Program Files\Java\jdk-11.0.2bin
--- LOG BELOW:
`TMSyntax.ts:50 Overwriting grammar scope name to file mapping for scope source.java.
Old grammar file: file:///c%3A/Users/medin/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/extensions/java/syntaxes/java.tmLanguage.json.
New grammar file: file:///c%3A/Users/medin/.vscode/extensions/georgewfraser.vscode-javac-0.2.13/lib/java.tmLanguage.json
e.register @ TMSyntax.ts:50
extensionHost.ts:325 [Extension Host] debugger listening on port 4045
extensionHost.ts:231 Extension Host
extensionHost.ts:232 Debugger listening on ws://127.0.0.1:4045/9145b838-c5bc-44fa-96a6-eaabd3385ae0
For help, see: https://nodejs.org/en/docs/inspector
log.ts:161 INFO no standard startup: panel is active
console.ts:134 [Extension Host] Activating Java
console.ts:134 [Extension Host] c:\Users\medin.vscode\extensions\georgewfraser.vscode-javac-0.2.13\dist\windowsbin\launcher
notificationsAlerts.ts:40 Couldn't start client Java Language Server
t.onDidNotificationChange @ notificationsAlerts.ts:40
log.ts:173 ERR spawn c:\Users\medin.vscode\extensions\georgewfraser.vscode-javac-0.2.13\dist\windowsbin\launcher ENOENT: Error: spawn c:\Users\medin.vscode\extensions\georgewfraser.vscode-javac-0.2.13\dist\windowsbin\launcher ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:229:19)
at onErrorNT (internal/child_process.js:406:16)
at process._tickCallback (internal/process/next_tick.js:63:19)
console.ts:134 [Extension Host] rejected promise not handled within 1 second
t.log @ console.ts:134
log.ts:173 ERR Launching server using command c:\Users\medin.vscode\extensions\georgewfraser.vscode-javac-0.2.13\dist\windowsbin\launcher failed.
console.ts:134 [Extension Host] (node:9912) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
t.log @ console.ts:134
2console.ts:134 [Extension Host] settings: {"maxStringLength":0,"showStaticVariables":true,"showQualifiedNames":false,"showHex":false,"enableHotCodeReplace":true,"logLevel":"WARNING","javaHome":"C:\Program Files\Java\jdk-11.0.2\"}`
I'm having the same issues... here's my log
"java.home": "C:\Program Files\Java\jdk-11.0.2"
@Leomedina could you try
"java.home": "C:\\Program Files\\Java\\jdk-11.0.2"
@snjeza thanks for catching that. - that was on me. I pasted the wrong text.
My java.home is actually:
"java.home": "C:\\Program Files\\Java\\jdk-11.0.2"
Could you show the output of the following commands:
dir "C:\Program Files\Java\jdk-11.0.2"
dir "C:\Program Files\Java\jdk-11.0.2\bin"
@snjeza Here's the output:
` Directory of C:\Program Files\Java\jdk-11.0.2
02/08/2019 03:47 PM
Directory of C:\Program Files\Java\jdk-11.0.2bin
02/08/2019 03:47 PM
C:\Users\medin>`
@Leomedina could you remove the georgewfraser.vscode-javac extension and install RedHat vscode-java - https://marketplace.visualstudio.com/items?itemName=redhat.java
@snjeza that fixed it! Thank you.
like @snjeza answer, deleting george's extension worked for me, thanks man
* Open the command palette (F1) * select Developer: Toggle Developer Toolsreport any errors you see in the console
Uncaught (in promise) Error: Fetching local packages failed.
at l (C:\Users\Parallax\AppData\Local\atom\app-1.35.1resources\appstatic\
at C:\Users\Parallax\AppData\Local\atom\app-1.35.1resources\appstatic\
at Function.simpleDispatch (C:\Users\Parallax\AppData\Local\atom\app-1.35.1resources\appstatic\
at Emitter.emit (C:\Users\Parallax\AppData\Local\atom\app-1.35.1resources\appstatic\
at BufferedProcess.handleError (C:\Users\Parallax\AppData\Local\atom\app-1.35.1resources\appstatic\
at ChildProcess.process.on.e (C:\Users\Parallax\AppData\Local\atom\app-1.35.1resources\appstatic\
at emitOne (events.js:116:13)
at ChildProcess.emit (events.js:211:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:196:12)
at onErrorNT (internal/child_process.js:372:16)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
VM22
at l (C:\Users\Parallax\AppData\Local\atom\app-1.35.1resources\appstatic\
at C:\Users\Parallax\AppData\Local\atom\app-1.35.1resources\appstatic\
at Function.simpleDispatch (C:\Users\Parallax\AppData\Local\atom\app-1.35.1resources\appstatic\
at Emitter.emit (C:\Users\Parallax\AppData\Local\atom\app-1.35.1resources\appstatic\
at BufferedProcess.handleError (C:\Users\Parallax\AppData\Local\atom\app-1.35.1resources\appstatic\
at ChildProcess.process.on.e (C:\Users\Parallax\AppData\Local\atom\app-1.35.1resources\appstatic\
at emitOne (events.js:116:13)
at ChildProcess.emit (events.js:211:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:196:12)
at onErrorNT (internal/child_process.js:372:16)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
internal/process/warning.js:18 (node:9860) [DEP0013] DeprecationWarning: Calling an asynchronous function without callback is deprecated.
writeOut @ internal/process/warning.js:18
VM22
at l (C:\Users\Parallax\AppData\Local\atom\app-1.35.1resources\appstatic\
at C:\Users\Parallax\AppData\Local\atom\app-1.35.1resources\appstatic\
at Function.simpleDispatch (C:\Users\Parallax\AppData\Local\atom\app-1.35.1resources\appstatic\
at Emitter.emit (C:\Users\Parallax\AppData\Local\atom\app-1.35.1resources\appstatic\
at BufferedProcess.handleError (C:\Users\Parallax\AppData\Local\atom\app-1.35.1resources\appstatic\
at ChildProcess.process.on.e (C:\Users\Parallax\AppData\Local\atom\app-1.35.1resources\appstatic\
at emitOne (events.js:116:13)
at ChildProcess.emit (events.js:211:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:196:12)
at onErrorNT (internal/child_process.js:372:16)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
(anonymous) @ VM22
VM22
at l (C:\Users\Parallax\AppData\Local\atom\app-1.35.1resources\appstatic\
at C:\Users\Parallax\AppData\Local\atom\app-1.35.1resources\appstatic\
at Function.simpleDispatch (C:\Users\Parallax\AppData\Local\atom\app-1.35.1resources\appstatic\
at Emitter.emit (C:\Users\Parallax\AppData\Local\atom\app-1.35.1resources\appstatic\
at BufferedProcess.handleError (C:\Users\Parallax\AppData\Local\atom\app-1.35.1resources\appstatic\
at ChildProcess.process.on.e (C:\Users\Parallax\AppData\Local\atom\app-1.35.1resources\appstatic\
at emitOne (events.js:116:13)
at ChildProcess.emit (events.js:211:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:196:12)
at onErrorNT (internal/child_process.js:372:16)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
VM22
at l (C:\Users\Parallax\AppData\Local\atom\app-1.35.1resources\appstatic\
at C:\Users\Parallax\AppData\Local\atom\app-1.35.1resources\appstatic\
at Function.simpleDispatch (C:\Users\Parallax\AppData\Local\atom\app-1.35.1resources\appstatic\
at Emitter.emit (C:\Users\Parallax\AppData\Local\atom\app-1.35.1resources\appstatic\
at BufferedProcess.handleError (C:\Users\Parallax\AppData\Local\atom\app-1.35.1resources\appstatic\
at ChildProcess.process.on.e (C:\Users\Parallax\AppData\Local\atom\app-1.35.1resources\appstatic\
at emitOne (events.js:116:13)
at ChildProcess.emit (events.js:211:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:196:12)
at onErrorNT (internal/child_process.js:372:16)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
(anonymous) @ VM22
VM22
at l (C:\Users\Parallax\AppData\Local\atom\app-1.35.1resources\appstatic\
at C:\Users\Parallax\AppData\Local\atom\app-1.35.1resources\appstatic\
at Function.simpleDispatch (C:\Users\Parallax\AppData\Local\atom\app-1.35.1resources\appstatic\
at Emitter.emit (C:\Users\Parallax\AppData\Local\atom\app-1.35.1resources\appstatic\
at BufferedProcess.handleError (C:\Users\Parallax\AppData\Local\atom\app-1.35.1resources\appstatic\
at ChildProcess.process.on.e (C:\Users\Parallax\AppData\Local\atom\app-1.35.1resources\appstatic\
at emitOne (events.js:116:13)
at ChildProcess.emit (events.js:211:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:196:12)
at onErrorNT (internal/child_process.js:372:16)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
@miggymiggoi The errors you listed here are seems from atom, but not VSCode.
Side note: I was getting this error as well and triple checked everything above for env variables, etc...
The key for me was to launch VSCode as an admin. At that point, everything started working.
Frustrating because setup/install specifically recommended NOT running install as an admin.
Hope this helps.
thank you.
thanks, @snjeza. Removing George's extension worked for me as well.
Side note: I was getting this error as well and triple checked everything above for env variables, etc...
The key for me was to launch VSCode as an admin. At that point, everything started working.
Frustrating because setup/install specifically recommended NOT running install as an admin.
https://github.com/redhat-developer/vscode-java/issues/785#
Hope this helps.
I had the same issue here like everyone else, and opening VS Code as an Admin, the message about not starting java Language is no more. Not sure how else to run VS Code Java not as Admin and prevent the message from showing or how to fix it?
@Leomedina could you remove the georgewfraser.vscode-javac extension and install RedHat vscode-java - https://marketplace.visualstudio.com/items?itemName=redhat.java
That worked, thanks!
I am having the same issue.
Brand new install of Windows 10.
JAVA_HOME: "C:\Program Files\AdoptOpenJDK\jdk-11.0.8.10-hotspot"
[[object Object]]Internal error.
and
Error: Internal error.
at c:\Users\djkong7.vscode\extensions\redhat.java-0.68.0\dist\extension.js:1:76464
at c:\Users\djkong7.vscode\extensions\redhat.java-0.68.0\dist\extension.js:1:76758
at Immediate.
at processImmediate (internal/timers.js:439:21)
These two errors are logged thousands of times.
I can't try "remove the georgewfraser.vscode-javac extension and install RedHat vscode-java -" because I've never had it installed.
Also tried to launch VSCode as admin. No luck.
Upon further searching, I found https://github.com/redhat-developer/vscode-java/issues/1588 . Maybe someone here has some ideas.
@djkong7 Could you attach your settings.json?
@snjeza Yeah! Here you go.
{
"editor.suggestSelection": "first",
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
"terminal.integrated.shell.windows": "C:\Program Files\PowerShell\7\pwsh.exe",
"java.trace.server": "verbose",
"java.configuration.checkProjectSettingsExclusions": false
}
@djkong7 Could you try to add:
"java.home": "C:\\Program Files\\AdoptOpenJDK\\jdk-11.0.8.10-hotspot",
backslashes must be escaped (duplicated)
@snjeza Looks like I'm still having the same issue. New settings.json:
{
"editor.suggestSelection": "first",
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
"terminal.integrated.shell.windows": "C:\\Program Files\\PowerShell\\7\\pwsh.exe",
"java.trace.server": "verbose",
"java.configuration.checkProjectSettingsExclusions": false,
"java.home": "C:\\Program Files\\AdoptOpenJDK\\jdk-11.0.8.10-hotspot"
}
same errors as before. Here is a screenshot of my Java Runtime Configuration.

Could you try to Clean the workspace directory ?
Same issue and same error messages after following the steps:
Open the command palette (F1)
select Java: Clean the Java language server workspace
click Restart and delete
@djkong7 could you attach your logs:
%APPDATA%\Code\User\workspaceStorage\
@snjeza So %APPDATA%\Code\User\workspaceStorage
redhat.java.zip
I was able to zip the original folder and get it down to 400MB. 15MB with 7zip if you'll accept that.
@djkong7 could you try to move your project to C:\
@snjeza That seemed to work! Is running projects that reside in \\wsl$ something that is officially not supported?
@djkong7 you can try Remote development in WSL
@snjeza Ahh, gotcha. I guess it gets confusing when to use that or not since you can now browse WSL files natively in windows explorer. Thank you for your help!
georgewfraser
Thanks buddy, this solved my issue also.
Most helpful comment
@Leomedina could you remove the georgewfraser.vscode-javac extension and install RedHat vscode-java - https://marketplace.visualstudio.com/items?itemName=redhat.java