Open Manish-Giri opened 5 years ago
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.2\bin
--- 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\windows\bin\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\windows\bin\launcher ENOENT: Error: spawn c:\Users\medin.vscode\extensions\georgewfraser.vscode-javac-0.2.13\dist\windows\bin\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\windows\bin\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.2\bin
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 Tools
report 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.1\resources\app\static\
@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.
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
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.
@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!
@Leomedina could you remove the georgewfraser.vscode-javac extension and install RedHat vscode-java - https://marketplace.visualstudio.com/items?itemName=redhat.java
It worked. Great thanks!
I had exactly the same problem that @djkong7 had. Project that I'm working on is located on WSL2, but I needed to run it on Windows (Firewall was blocking traffic from wsl2. wsl2 and workstation firewalls are just a big mess :-/)
There's a simple workaround for the problem where language server fails compiling source code from UNC paths ( \wsl$\foo = UNC path)
Open \\wsl$\
in File Explorer. Right click on the WSL2 installation and select Map network drive...
. Finally open project from the mapped drive in VS Code.
Hello @snjeza I am facing the couldn’t start client java Language server do you know how to fix this?
@chehab2003 I just uninsstalled java enviroment aqnd extentions then install again and restart, will work properly, becaue now VSC has better API to dedct your bug.
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.
Worked like magic. Thanks man.
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". I am facing the same problem what can I do?
Does it happen all the time? I had the same issue just a while ago. Simply restarting VS Code seemed to work.
On Wed, 8 Feb 2023 5:10 am Nawab_furkan, @.***> wrote:
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". I am facing the same problem what can I do?
— Reply to this email directly, view it on GitHub https://github.com/redhat-developer/vscode-java/issues/785#issuecomment-1421970755, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZI7RH26XCMMSQ3U5UKXLN3WWMME7ANCNFSM4GUBQLCQ . You are receiving this because you commented.Message ID: @.***>
I happened to solve my instance of this issue by editing the settings.json
:
I found following:
"java.jdt.ls.java.home": ",
After adding my openjdk-directory on this parameter, the error didn't show up anymore.
I happened to solve my instance of this issue by editing the
settings.json
:I found following:
"java.jdt.ls.java.home": ",
After adding my openjdk-directory on this parameter, the error didn't show up anymore.
ok I will check it....and thanks for the help & support
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 -Environment
Steps To Reproduce
Additional Informations
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.