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

‘vscode.java.resolveClasspath’ failed.

Open LittleBlackTong opened this issue 2 years ago • 3 comments

lsp-workspace-command-execute: ‘workspace/executeCommand’ with ‘vscode.java.resolveClasspath’ failed.

(error "Failed making field ’java.lang.StackTraceElement#classLoaderName’ accessible; either increase its visibility or write a custom TypeAdapter for its declaring type.") Mark set

I need some help

LittleBlackTong avatar May 09 '23 14:05 LittleBlackTong

I've never used this command ever. And can not found this commad in my environment. Just curious what this command is used for.

sincebyte avatar May 18 '23 12:05 sincebyte

this is my dap-template

(dap-register-debug-template "jetcache-application" (list :type "java" :request "attach" :args "" :cwd nil :stopOnEntry :json-false :host "localhost" :request "launch" :modulePaths (vector) :classPaths nil :projectName "jetcache-application" :mainClass "com.tongzhou.jetcache.JetcacheApplication"))

I dont not know how to set config

LittleBlackTong avatar May 21 '23 11:05 LittleBlackTong

I ran into this same issue. What I would up doing was re-installing the jdtls lsp server.

;; Re-install Java lsp server.  When running below command, select jdtls
M-x lsp-install-server

;; Quit Emacs
C-x C-c

;; Restart emacs and navigate to breakpoint you wish to set in your code
M-x dap-breakpoint-add

;; Run debugger
M-x dap-java-debug

;; Wow your friends and enemies as Emacs stops at the breakpoint and lets you see variable contents and such

Note: I'm using OpenJDK 17 here as provided by Ubuntu.

cfuhrman avatar Jun 20 '23 19:06 cfuhrman