Understand what the Clojure CLI installs, how clj and clojure relate to the JVM classpath, and why the CLI version is separate from the Clojure language version.
Installing Clojure is not like installing a separate runtime beside the JVM. Clojure is a JVM language, and the language itself is distributed as a JAR dependency. The Clojure command-line tools give you convenient commands for starting a REPL, building classpaths, downloading dependencies, and running Clojure code.
For a Java engineer, the useful mental model is:
| Piece | What it is | Java comparison |
|---|---|---|
| Clojure language | A JVM library artifact, usually from Maven Central | A dependency such as org.clojure/clojure |
| Clojure CLI | The command-line tooling behind clojure and clj |
A launcher/classpath tool, not a full Maven clone |
deps.edn |
Data configuration for dependencies, paths, and aliases | A lighter classpath/dependency descriptor |
| REPL | A live JVM process with Clojure loaded | More like an interactive debugger console than jshell |
The official Clojure install guide treats the Clojure CLI version and Clojure language version as separate. That distinction matters in real projects:
This is different from many Java tool installs, where the command version and language/runtime version feel tightly bundled.
clj Versus clojureYou will see two commands:
1clj
2clojure
Use clj for interactive REPL work when it is available. Use clojure when running explicit command-line operations, scripts, or aliases. They are closely related, but clj is the friendlier interactive entry point on platforms where it wraps line-editing behavior.
After the CLI is installed, you should be able to:
1clojure --version
2clj -h
3clojure -Spath
These prove different things:
| Command | What it verifies |
|---|---|
clojure --version |
The CLI command is installed and can report its tooling version |
clj -h |
The interactive REPL command can start far enough to print help |
clojure -Spath |
The CLI can compute a JVM classpath |
If Java is missing or misconfigured, Clojure commands will fail before your code is involved. Always verify Java first.
The goal is not to memorize installer details. The goal is to reach a stable loop:
clojure and clj are available.Once those are true, you can learn Clojure by evaluating real code instead of guessing from static examples.