Browse Clojure Foundations for Java Developers

Creating Your First Clojure Project

Create a tiny project with a runnable main, a test namespace, and a REPL-friendly structure.

Your first Clojure project should be boring in a good way: a predictable folder layout, a namespace you can load, a function you can call from the REPL, and at least one test you can run.

What you are building here

  • A src/ namespace that loads cleanly.
  • A test/ namespace that runs quickly.
  • A dependency file (deps.edn or project.clj) that you can extend later.
  • A simple entry point so you can run the code outside the REPL.

Java mental model: treat this as the smallest “Maven archetype” project, but optimized for interactive development.

Once you can create and run a tiny project end-to-end, you can iterate confidently in the later chapters without fighting your tools.

In this section

Revised on Friday, April 24, 2026