4
votes

Leiningen downloaded clojure-1.9.0.jar as a dependency. It's located at ~/.m2/repository/org/clojure/clojure/1.9.0. It works fine through a lein repl.

However, if (from ~/.m2/repository/org/clojure/clojure I run java -jar 1.9.0/clojure-1.9.0.jar, instead of the expected behaviour (initiation of a REPL) I get an exception:

Could not locate clojure/spec/alpha__init.class or clojure/spec/alpha.clj on classpath.

For other Clojure versions (1.8.0, 1.6.0, 1.4.0) I get a REPL as expected.

So what's wrong with clojure-1.9.0.jar - - or my setup - or my understanding?

Note:
If I run lein repl in a directory containing a project with a Clojure 1.9.0 dependency I get a REPL with Clojure 1.9.0, but if I start Leiningen from any other directory I get a REPL with Clojure 1.8.0. In both cases, REPL versions are REPL-y 0.3.7, nREPL 0.2.12. Running lein upgrade results in the message Leiningen is already up-to-date.

2
Try the new clj command-line tool for a basic repl - see clojure.org/guides/getting_started for installation.Alex Miller
Although my question specifically addressed the issues surrounding running Clojure 1.9 on Windows, some of the information may be helpful to you - see the accepted answer to this questionBob Jarvis - Reinstate Monica

2 Answers

6
votes

Clojure 1.9.0 is modularized with spec support broken off into two separate JARs that must be on your classpath.

See https://clojure.org/news/2017/12/08/clojure19

And as Alex Miller points out, the new clj tool will take care of this for you automatically.

1
votes

These classes have been split out, you can download the missing jars here: