Is there a lightweight Java environment for EMACS? I have used JDEE in the past, but it's accumulated a lot of, ahem, features since I used it last, and just trying to set it up has consumed a couple hours.
3 Answers
I would suggest Meghanada. It is light weighted, much easier to setup (compared to JDEE). It is not mature enough, but already supports auto-completion, syntax-checking and runs junit tests. It will also parse maven and gradle projects automatically. The overall experience is smooth enough for small and moderate scale projects. Refactoring support is still in its todo list though.
Ensime also worth a try. It is pretty good for Scala development, also has limited support for Java. But some rough edges are there.
-
If you use
spacemacs
with Emacs, using thejava
layer withmeghanada
as backend downloads themeghanada
server automatically. It's almost flawless now. Dec 18, 2019 at 13:09
You can try https://github.com/emacs-lsp/lsp-java ,
it uses Eclipse JDT Language Server
as backend.
-
It has improved dramatically, to the point it's comfortably usable on a 32-bit laptop maxed-out at 2Gb of RAM. The language server installs automatically and detects maven-generated projects without any manual intervention. And it feels as lightweight as
meghanada
. Dec 18, 2019 at 12:54
I don't know if you'd consider it "lightweight," but I've had good luck with eclim. It uses eclipse for the heavy lifting, but it also integrates well with eclipse's project management. It has company integration that works well.
There's a bit to learn, but not a whole lot. It works well to reduce the pain of working with Java in Emacs to just the pain of working in Java.