microsoft / vscode-java-pack

VS Code extensions for Java developers.
Other
285 stars 128 forks source link

Couldn't start client Java Language Server #1114

Open hypenturn opened 1 year ago

hypenturn commented 1 year ago

Type: Bug

The notification keep saying about Couldn't start client Java Language Server I already install the language support and also enable it and other extention that the system told me to and also for some reason this "Java 17 or more recent is required to run the Java extension. Please download and install a recent JDK" I already installed and locate it but it does not show or update I also tried to reload still the same I even installed the lates JDK please help me find the problem I need it for my quiz in Friday.

Extension version: 0.39.2 VS Code version: Code 1.73.1 (6261075646f055b99068d3688932416f2346dd3b, 2022-11-09T04:27:29.066Z) OS version: Windows_NT x64 10.0.22621 Modes: Sandboxed: No

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i3-10110U CPU @ 2.10GHz (4 x 2592)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off| |Load (avg)|undefined| |Memory (System)|3.83GB (0.21GB free)| |Process Argv|--crash-reporter-id 7666d85c-7421-41de-94f5-bf8f99c6537f| |Screen Reader|no| |VM|0%|
A/B Experiments ``` vsliv368:30146709 vsreu685:30147344 python383cf:30185419 vspor879:30202332 vspor708:30202333 vspor363:30204092 vslsvsres303:30308271 pythonvspyl392:30443607 vserr242:30382549 pythontb:30283811 vsjup518:30340749 pythonptprofiler:30281270 vshan820:30294714 vstes263cf:30335440 vscorecescf:30445987 pythondataviewer:30285071 vscod805:30301674 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 cmake_vspar411:30581797 vsaa593cf:30376535 pythonvs932:30410667 cppdebug:30492333 vsclangdc:30486549 c4g48928:30535728 dsvsc012cf:30540253 azure-dev_surveyone:30548225 pyindex848:30577860 nodejswelcome1cf:30587006 fc301958:30595537 2e4cg342:30602488 gswce1:30605430 3d0df643:30608728 dbltrim-noruby:30604474 89544117:30607850 ```
Eskibear commented 1 year ago

Java 17 or more recent is required to run the Java extension. Please download and install a recent JDK"

Somehow the embedded JRE is not used to launch the Java extension. You may check whether java.exe and javac.exe exists on below path:

C:\Users\<username>\.vscode\extensions\redhat.java-<someVersion>-win32-x64\jre\17.0.5-win32-x86_64\bin

I even installed the lates JDK

If it's JDK 17+, you can specify to use this one to launch java extension, via setting java.jdt.ls.java.home, see https://github.com/redhat-developer/vscode-java/#java-tooling-jdk