Check Java, the Clojure CLI, REPL startup, language version, classpath construction, and optional Leiningen commands before debugging project-specific setup problems.
When setup goes wrong, Java developers often lose time debugging the wrong layer. Verify the stack from the bottom up:
This sequence tells you whether the failure is Java discovery, Clojure tooling, dependency resolution, editor integration, or project code.
1java -version
2javac -version
If Java fails, stop. Clojure runs on the JVM, so Clojure tooling will not be reliable until Java is stable.
1clojure --version
2clj -h
clojure --version reports the CLI tooling version. That is not necessarily the same as the Clojure language version used by a project dependency.
1clj
At the prompt, run:
1(clojure-version)
2(System/getProperty "java.version")
3(System/getProperty "java.home")
This verifies both the Clojure language inside the REPL and the JVM hosting it.
From the shell:
1clojure -Spath
This prints the classpath the CLI computed. It should include the project paths and dependency jars implied by your deps.edn files.
| If this fails | Likely layer |
|---|---|
java not found |
Java install or PATH |
clojure not found |
CLI install or PATH |
| REPL starts on wrong Java | editor/shell Java selection |
-Spath fails resolving deps |
dependency coordinates, proxy, certificates, or repository access |
| code namespace cannot load | namespace-to-file mapping or classpath paths |
If the project uses project.clj, also run:
1lein --version
2lein repl
3lein test
If the project uses only deps.edn, do not add Leiningen just to make setup feel familiar. Verify the workflow the project actually uses.
In a plain REPL:
1(+ 1 2 3)
2;; => 6
3
4(map inc [1 2 3])
5;; => (2 3 4)
Then load one project namespace from your editor. That final step proves the terminal setup and editor-connected REPL are aligned.