首页 > 技术文章 > coc.nvim the java server crashed 5 times in the last 3 minutes. the server will not be restarted

wushuaiqi 2022-04-14 18:35 原文

nvim 使用 coc-java 报错

coc.nvim the java server crashed 5 times in the last 3 minutes. the server will not be restarted

在安装 coc-java 后,启动 编辑Java 的时候遇到了这个问题,后来在网上找了很多中解决办法,先是说将 jdk 更新到 11 这个问题会得到解决,GitHub 上面也是说这个最低的 Java 版本是 11 ,然后我将 jdk 更新到 11 后,过了一会还是报错了,如何又找到了新的解决方案,我们在初次使用的时候,他是会现在新的 jdt 我不知道是不是不兼容的问题,后来发现 57 版本是可以用的。

参考文档:https://github.com/neoclide/coc-java/issues/99

从新下载一个 jdt 将其替换就好了

文件下载地址: https://download.eclipse.org/jdtls/milestones/0.57.0/

解压文件,将文件替换掉 coc server 就好了

替换掉所有的目录和文件(直接解压到这个路径下即可):

~/.config/coc/extensions/coc-java-data/server

推荐阅读