Browse Clojure Foundations for Java Developers

Understanding Project Structure

How namespaces map to files, and what the standard src/test/resources layout looks like.

Clojure projects look simple on disk, but there are a few conventions that are worth learning early. Once you can glance at a repository and predict where a namespace lives, you will read code much faster.

The conventions that matter

  • src/ holds production code; test/ holds tests; resources/ holds classpath resources.
  • A namespace maps to a file path, roughly like a Java package maps to a directory.
  • Hyphens in namespace segments become underscores in file names (my-app.core -> my_app/core.clj).

Java mental model: namespaces are not classes, but the “package-to-path” navigation skill transfers almost directly.

This section gives you the minimum structure you need to follow real projects and avoid “where is this code actually loaded from?” confusion.

In this section

Revised on Friday, April 24, 2026