r/emacs • • 14d ago

java-agent-loader (JAL) v3.0.0 – now works with plain lsp-mode and built-in eglot – Looking for testers

Hey everyone!

Just released v3.0.0 of java-agent-loader (JAL), a small Emacs package that automates the detection and setup of Java agents (like Lombok, JaCoCo, etc.) in your Maven or Gradle projects. The alternative is wiring them up manually, which gets painful fast when you switch between multiple Java projects using different versions of these libraries—especially in larger codebases and companies.

I noticed some folks prefer skipping lsp-java and eglot-java in favor of simpler setups using just vanilla lsp-mode or built-in eglot—so in v3.0.0, JAL now supports both directly out of the box (lsp-java and eglot-java are still supported).

If you're already using JAL, no config changes are needed—jal-lsp-java-mode and jal-eglot-java-mode keep their names and work as before.

Quick setup:

It'll be available on MELPA on the next sync, or you can grab it right away from GitHub using use-package:

(use-package jal
  :vc (:url "https://github.com/saulotoledo/java-agent-loader" :rev :newest)
  :custom
  (jal-auto-setup t)
  :config
  (jal-lsp-java-mode 1)) ; or (jal-eglot-java-mode 1)

Keep in mind that if you're not using lsp-java or eglot-java, you still need to have basic JDTLS support configured on your own—JAL isn't meant to replace them, just handle the agent flags. Check out other setup scenarios in the README.

Looking for testers and feedback!

Since this reworks how JAL hooks into LSP and Eglot clients, I’d really appreciate some input from you—especially if you're using vanilla eglot or lsp-mode, Gradle projects, or multi-module Maven setups. If you run into any quirks, broken setups, or have suggestions, drop a comment here or open an issue on GitHub. Thanks!

10 Upvotes

7 comments sorted by

3

u/max_465 14d ago

Ask Sacha if she would interview you on her live stream?

2

u/saulotoledo 14d ago

Thanks! She actually already included the package in her Emacs News list alongside the other new packages right when it launched, which was really cool to see.

2

u/shipmints 14d ago

Tools like Lombok are not "agents," they are just tools/helpers that do not act on one's behalf. I fear you'll confuse people who think agents imply LLMs. You might want to rename the package.

2

u/saulotoledo 14d ago

I actually thought about that when publishing the package and it was a bit of a dilemma! However, "Java agent" has been the official JVM term for -javaagent tools since Java 5, so I figured inventing a different name would be even more confusing—especially since that's how Lombok and the like hook into JDTLS under the hood.

1

u/shipmints 14d ago

Sad precedent since true agency isn't a feature of the loaded libraries like Lombok. It's just a compiler helper.

1

u/saulotoledo 14d ago

I have to agree with you—most `-javaagent` tools, like JaCoCo or profilers, have little to no autonomy. Something like the OpenTelemetry Java agent comes a bit closer to the traditional idea of a software agent, continuously observing the application and sending telemetry to external systems, though it's still fundamentally different from modern AI agents.

3

u/Signal_Pattern_2063 14d ago

In java parlance they are javaagent arguments on the jdk command line which predates the LLMs. So I think the ambiguity isn't their fault.