Clojure Java Interop documentation explains how Clojure code can access Java classes and methods.

clojure.org/reference/java_interop
Java Interop homepage screenshot

About Java Interop

This page documents how Clojure code accesses Java classes, fields, and methods. It describes class-name resolution, member-access forms, the '.' special form, use of qualified methods as function values since Clojure 1.12, and topics including arrays, vararg methods, type hints, primitives, coercions, streams, XML support, and calling Clojure from Java.

It notes that qualified methods used as values cannot resolve overloads without :param-tags metadata and fall back to reflective calls, and that plain field access may resolve to a same-named no-argument method unless the leading-dash form is used.

Key features

  • Access Java classes via fully qualified or imported names
  • Access instance and static fields and methods with dot forms
  • Use qualified Java methods as ordinary functions in value contexts
  • Refer to inner classes with $ separator
  • Designate array classes with Classname/N syntax
  • Specify method signature with :param-tags metadata
Best for: Clojure programmers who need to access Java classes and methods.
Good for
  • Covers class access, member access, arrays, primitives, streams, and calling Clojure from Java
  • Shows example expressions and results for class and member access
  • Documents idiomatic member forms and field-versus-method resolution rules
Watch out for
  • Qualified methods used as values do not resolve overloads and use reflective calls
  • Plain field access may resolve to a same-named no-argument method instead
  • :param-tags metadata is ignored on unqualified methods

Java Interop at a glance

Type
Website
Pricing
Not confirmed. Check the site
Platforms
Web
Open source
Not stated
Language
English
Last checked
Oct 5, 2026 · Online when checked
Listed
Oct 5, 2026

Java Interop alternatives

Tools and sites you could use instead, ranked by how closely they match.

All 24 alternatives

Popular in Programming Languages

Well-known listings from the same topic.

All 66

Java Interop FAQ

How do I refer to a Java inner class in Clojure?
Separate the outer and inner names with $, for example java.util.Map$Entry.
How do I ensure an access is treated as a field?
Use a symbol starting with -, such as (.-x instance) or (. instance-expr -field-symbol), which resolves only as field access.
What happens when an overloaded qualified method is used as a value?
It cannot resolve the overload and produces a reflective call; add :param-tags metadata to specify the signature of one method.
Is something wrong or out of date?

Tell us and an editor will check it.

Own this website?

Claim the listing and suggest updates yourself. An editor checks every claim first.

Claim this listing