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.

  • On emacs.zeef.com there are alternatives under Java/C# section for your question. – ReneFroger Jul 23 '17 at 19:47

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.

| improve this answer | |
  • If you use spacemacs with Emacs, using the java layer with meghanada as backend downloads the meghanada server automatically. It's almost flawless now. – dennismayr Dec 18 '19 at 13:09

You can try https://github.com/emacs-lsp/lsp-java , it uses Eclipse JDT Language Server as backend.

| improve this answer | |
  • 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. – dennismayr Dec 18 '19 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.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.