[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Editing Java (with LSP)

From: Alessandro Bertulli
Subject: Re: Editing Java (with LSP)
Date: Mon, 13 Jun 2022 23:35:41 +0200
User-agent: mu4e 1.6.11; emacs 28.1


> I use lsp-mode relatively successfully to work on a Java project with
> ~9000 *.java files (  I find it
> easier than using lsp-mode with C because no special compiler
> arrangements are needed, it works itself.

Good to hear that, it means it is usable. By the way, which system are
you on? I'm currently using Arch (non meme intended) and I suspect my
system can be buggy by misconfiguration.

> I needn’t to use anything
> else.  The only special configuration I use is
>   (setq lsp-java-vmargs
>         '("-noverify" "-Xmx4G" "-XX:+UseG1GC"
>           "-XX:+UseStringDeduplication"))
> but I can’t recall why it is needed.

Thanks, I'll investigate those settings.

>From time to time, I experience similar symptoms like those you
> describe.  In such a case, I delete ~/.emacs.d/.cache and
> ~/.emacs.d/  Then it fetches jdtls, reindexes the project
> and starts working fine again.

I figured out that, apparently, a simple M-x lsp-workspace-restart is
sufficient. Meaning that it seems that it is the server that crashes, so
restarting it solves the problem. Of course, it is not normal it crashes
so often, but anyway.

> OTOH, dap-mode works much worse and I cannot use it for Java debugging.
> IIRC the most annoying thing was collapsing expanded data structures all
> the time, making practically impossible watching what happens with data.
> And the overall functionality was limited due to inability to work well
> with the given maven definitions.  I use IntelliJ IDEA for debugging,
> which works perfectly.

Uhm, for me dap-mode (SEEMS to) work well, but to be honest I haven't
had the need to investigate deep data structures yet. In case, I'll use
IntelliJ, it'll simply means that Emacs is not ready yet to be used for
Java editing. Which I think it's a shame, because I think it has the
potentiality to do so. Anyway, right now I think it's pretty standard
opinion that IntelliJ IS the de-facto editor for Java, and it's the
flagship of JetBrains.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]