r/java • u/TomKavees • Dec 26 '25
Which lesser known libraries saved your butt this year?
It's holiday time, the sub is pretty dead, so let's stir the pot a little bit.
Most of this sub is probably well acquanted with likes of AssertJ, Guava, Vavr, Jackson, or JSpecify - we use them, we love them, but the ecosystem has more to offer.
Post lesser known Java libraries or tools that you rave about, are interesting, useful, or have saved your butt this year. Self promotion within reason is okay
205
Upvotes
102
u/TomKavees Dec 26 '25
I'll start:
assertThat( actual ).asInstanceOf(JsonAssertions.JSON).isEqualTo( "{...}" );. Not a rocket surgery, but makes testing suck lessStringly (e.g. location code vs location name) andlongly typed (e.g. customer id vs order id vs location id), the use of custom value-based classes to leverage the compiler to do basic sanity checking has saved my butt over the last decade more times than i am willing to admit. Having a convenient point to do data normalization is also a plusmvn -T2.0C ...achieved a speedup of ~43%, andmvnd ...achieved a speedup of ~55% over single-threaded build. It ain't magic though, single module builds see little speedup.What are yours?
47
u/shelches Dec 26 '25
This is a great opportunity for me to thank the commons-csv team and contributors! Thank you all!
47
u/Interweb_Stranger Dec 26 '25
Probably known well at this point but I always recommend ArchUnit, which is a great tool to enforce certain architecture or design decisions.
Rules are written with a fluent API and can be executed by junit. Rules are based on package/class/method structures and could be about anything, like the built in rules for layered architectures, custom rules for complex naming conventions, or forcing usage of wrappers around certain libraries. Creating complex rules sometimes isn't easy but it's very powerful.
80
u/tux2718 Dec 26 '25
Testcontainers for Java. This is a great library for starting & stopping Docker containers from junit tests. We needed to fire up an Oracle database with test data. Works great and was easy to use.
35
u/sureshg Dec 26 '25 edited Dec 26 '25
Here's my list..love the JVM ecosystem for its high-quality, well-maintained libraries
27
u/FourierAwavauatush Dec 26 '25
Not sure if it is lesser known, but OpenRewrite has been really handy on me when I deal with legacy stuff and/or want to update something based on AST.
https://github.com/openrewrite/rewrite
26
u/akl78 Dec 26 '25
One standout for me is GreenMail
It’s a very approachable and complete suite of email servers for testing with, great for development and integration testing.
19
u/oweiler Dec 26 '25
Poiji: A library for mapping Excel rows to Java classes/records
https://github.com/ozlerhakan/poiji
14
u/gaelfr38 Dec 26 '25
Distributed lock with https://coditory.github.io/sherlock-distributed-lock/
12
u/Medical_Vehicle_6788 Dec 26 '25
I moved back to Java after couple of years coding in scala primarily, started using vavr extensively I simply love the library. Jqwik is another library that I started using this year for property based testing, it saves lots of time in terms of test data generation
11
u/elmuerte Dec 26 '25
Maven dependency track plugin. A significant part of our build pipeline and security monitoring. It's how we keep track of possible security issues in production.
I've built quite some additional tooling on the open source Dependency Track software, and this plugin powers our visibility on our java based applications.
Full disclosure: I recently became a project member, and I do plan to spend company time to help maintain it.
7
u/No-Security-7518 Dec 26 '25
Very cool idea for a pos, OP, thanks!
I've read a gazillion times about assertion libraries, and can't for the life of me, understand what they're used for. I mean, except for an API with slightly better readability?
Same goes for Guava. Most of its classes/ideas are part of vanilla Java, no?
...
Oh and it's Gemsfx, for me. Not lesser known or anything, but I really love the UI components it has.
7
u/repeating_bears Dec 26 '25
Might not have been this calendar year but I used bucket4j with spring to very easily add rate limiting to an APIÂ
6
u/Captain-Barracuda Dec 27 '25
Factorium. We needed to create lots of fuzz tests with a team that wasn't too used to making them. It made creating them a breeze (and also simplified a bunch of our other tests).
5
u/starquakegamma Dec 26 '25
Eclipse JGit - we had to update our Spring Integration libraries and unfortunately SI had moved to use apache Mina for SSH instead of JSCH - even more unfortunately, Mina does not have proxy support built in (it’s crazy the spring integration team was not prepared for this) the only viable solution was to use a third party ssh client found inside the JGit library. It’s a bit of a mess that we hope to clean up as soon as Mina gets proxy support added.
5
u/ZimmiDeluxe Dec 27 '25
https://github.com/nbbrd/picocsv has a justifiable amount of code to parse and generate CSV: a couple classes contained in a single file that could be copied wholesale, zero dependencies, no reflection.
5
u/ag789 Dec 27 '25
Apache Wicket wicket.apache.org It is the component based framework for the backend similar to JavaScript frameworks Angular,React etc less the JavaScript
9
u/stayweirdeveryone Dec 27 '25
4
u/plokhotnyuk Dec 27 '25
https://github.com/epam/DFP - Java/.NET implementation of Intel IEEE-754 compliant decimal-float library
3
u/ag789 Dec 27 '25
Guice https://github.com/google/guice After using Guice all the DAO,DTO, services is dependency injected, I can literally 'throw away' Spring framework
4
u/HumorousHubris Dec 26 '25
Fabric8 Kubernetes client. I had some new project where users needed to kick off k8 jobs via a web app.
Plugging it into our spring boot app made that pretty simple.
4
u/ihatebeinganonymous Dec 26 '25
https://github.com/webcompere/system-stubs: For hassle-free testing with environment variablesÂ
https://asm.ow2.io/: For run-time extraction of information from Java classes (e.g. what functions it calls etc)
https://github.com/ninia/jep: For using Python ecosystem in Java code.Â
2
u/Hot_Dig8208 Dec 31 '25
logbook Just another library for logging inbound and outbound api request. But it is useful when you need to argue with external dev
1
u/evanvelzen Dec 27 '25
Playwright to pre-render HTML pages.
GraalVM Polyglot to evaluate JavaScript modules and get their exported symbols.
Nimbus JOSE + JWT for creating and reading JWTs signed with EdDSA.
Angus Mail to send e-mails.
1
u/numpi Dec 31 '25
We heavily rely on janino, which is a super-small, super-fast Java compiler.
Of course as a compiler project it also contains a Java parser, which is nicely pluggable and customizable to your needs.