Browse Clojure Foundations for Java Developers

Accessing Java Libraries

Add Maven dependencies and use Java libraries from Clojure without turning your code into Java-in-Lisp.

One of Clojure’s biggest practical advantages is that you can use the entire Java ecosystem: databases, HTTP clients, time libraries, cloud SDKs, observability tooling, and more.

The key engineering skill is not “can I call this library?”—it is how do I contain it?

  • Add the dependency (tools.deps or Leiningen).
  • Wrap the library behind a small Clojure namespace API.
  • Convert inputs/outputs to plain data at the boundary.

This keeps most of your code idiomatic and test-friendly while still getting the leverage of mature Java libraries.

In this section

Revised on Friday, April 24, 2026