coc-java icon indicating copy to clipboard operation
coc-java copied to clipboard

Invalid runtime for JavaSE-20: Runtime at '/usr/local/opt/jdk-20.0.2.jdk/Contents/Home' is not compatible with the 'JavaSE-20' environment.

Open zl03jsj opened this issue 2 years ago • 5 comments

image my coc-settings:

  "java.configuration.runtimes": [
    {
      "name": "JavaSE-20",
      "path": "/usr/local/opt/jdk-20.0.2.jdk/Contents/Home",
      "default": true
    }
  ]

and my jdk directory here: image

The version of coc-java is v1.15.2.

zl03jsj avatar Oct 06 '23 15:10 zl03jsj

I get the same.

ketiko avatar Oct 23 '23 17:10 ketiko

me too...

cybaj avatar Nov 10 '23 13:11 cybaj

+1

ru-wang avatar Feb 06 '24 06:02 ru-wang

According to README.md, coc-java comes with bunlded jdt.ls from 1.14.0, which not support JDK 20/21.

So we can download latest jdt.ls manually and set "java.jdt.ls.director": "/path/to/your/jdt" at coc-settings.json.

JensenQi avatar Mar 20 '24 11:03 JensenQi

For anyone who wants to get java 21/22 support, you can try my branch https://github.com/neoclide/coc-java/pull/286

sainnhe avatar May 27 '24 03:05 sainnhe