Compiling the source code no longer works

After quite some time, I tried building LanguageTool myself again.
I cloned the entire code from GitHub and attempted to compile it using “mvn clean install”. That failed. Some methods are not being found (e.g., getVersion).
Has something changed?

1 Like

Yeah, they recently refactored some of the core API classes and getVersion got moved or renamed. Make sure you’re pulling the absolute latest changes from master and do a full mvn clean install -DskipTests because sometimes local old snapshots mess up the reactor dependencies if you haven’t built from a totally clean slate in a while.

I ran git clone https://github.com/languagetool-org/languagetool.git just half an hour ago.
After that, I ran mvn clean install -DskipTests. The compilation failed. There are several missing methods. One of them is getVersion, which is called in JLanguageTool.java. It ought to be defined in LTBuildInfo, but it isn’t.

Check the Java version. The current README says Java 17. But it should be probably Java 21.

I am working with OpenJDK 25.0.4 2026-07-21.

The build in SDK 25 won’t work until this PR is merged: update to JDK25 by SteVio89 · Pull Request #12161 · languagetool-org/languagetool · GitHub. It doesn’t work for me.

Probably, you need Java 21 to compile.

Downgrading to Java 21 solved the problem.

Thank you

2 Likes

I will merge the JDK25 branch next days.

Can LanguageTool still be run using Java 17 after the merge?
If not:
Would it be possible to postpone the switch to Java 25 until November? I maintain the open-source project WritingTool, which is based on LanguageTool and relies on it being operational. Making the switch would entail a significant amount of work for me regarding testing, as well as modifying my technical infrastructure and documentation. Due to personal reasons, I do not have the time to carry out this transition before November.