Open asif-mahmud opened 4 years ago
I have installed Oracle JDK 15
, compiled jdtls release 0.63 and copied the org.eclipse.jdt.ls.product/target/repository
under ~/.emacs.d/.cache/lsp
and renamed to eclipse.jdt.ls
. Seems like it worked. Except cant use the dap mode now. When i run dap-debug
after (require 'dap-java)
, it says Open an issue in lsp-mode to implement vscode.java.resolveMainClass
.
Sorry if i sound too noob, but i can't find a solution of what i am facing about setting up lsp-java. My setup environment is as follows -
I have been using
use-package
to load/configure all of the packages, and it is configured toensure
anddefer
all packages. Every other package works just fine. Here is mylsp-java
config block -After running
lsp-install-server
->jdtls
, lsp seems to install jdtls just fine.Now if i open a standalone java file (not part of any project like maven or gradle), even if i open a maven project, it doesn't really matter, emacs hangs for a few seconds, then jdtls is connected, then jdtls seems to scan/index all and everything in all of my harddisks and partitions. That takes about a few minutes obviously, although i don't know why thats even necessary. But afterwards i see no auto-completion or any other feature that i would have expected from
lsp-java
. If it helps in anyway i am attaching my*lsp-log*
partially, its too long to attach fully here. Here it is when jdtls says its ready[serverReady]
, and i am trying to edit the code -I know the log message is jdtls related issue, not specific to
lsp-java
, but what about the first issue about scanning everything.So, if you have encountered similar issue and have a fix please share, if not, please share how you setup
lsp-java
in more details so i or anyone else coming to this page can find a guide for a complete working setup.NOTE I have tried
emacs -Q -l minimal-java.el
where theminimal-java.el
has the exact config from the readme file of the repo. Also i tried OpenJDK 9, OpenJDK 14, Oracle JDK 8, Oracle JDK 15. Everytime i cleaned.emacs.d
, reinstalled jdtls and tried editing a java file. Same issue always. I don't haveJAVA_HOME
set, cause system default java is set to point to jdk install properly.