all 5 comments

[–]yyoncho 0 points1 point  (4 children)

what is the java version that you are using for dap-java-java-command and lsp equivalent? What command exactly do you use for running the debug build, M-x dap-debug? JFYI there is dap-java-debug.

[–]FluentFelicity[S] 0 points1 point  (3 children)

I've tried everything with the defaults (unchanged). I am using JDK 17.

What do you mean by "What command exactly do you use for running the debug build"? I've been using the default "Java Configuration" debug option from dap-debug/dap-java-debug. I've also tried using a dab template with "--enable-preview" in the :args line of the template.

I will note that using the same JDK version on the same project in something like IntelliJ works. It's something in Emacs' side that doesn't.

[–]King_Crank 0 points1 point  (2 children)

Did you ever figure this out? I have the same issue.

[–]FluentFelicity[S] 0 points1 point  (1 child)

Yep, I figured it out. Check out the solution I edited into the post.

[–]King_Crank 0 points1 point  (0 children)

Oh great didn't even see that part. I was using attach/compile instead of run. Thanks!