1
votes

I can start Clojure REPL from directory when it was unpacked (C:\Program Files\clojure-1.6.0) by this command in command line:

java -cp clojure-1.6.0.jar clojure.main

but anytime I want to start REPL I have to enter directory C:\Program Files\clojure-1.6.0, so I create bat file with next content:

java -cp C:\Program Files\clojure-1.6.0\clojure-1.6.0.jar clojure.main

and put it to directory wich includes in PATH variable. I expect that it will run Clojure REPL, but instead of it I get an error

Error: Could not find or load main class Files\clojure-1.6.0\clojure-1.6.0.jar

And I don't find in internet how to fix it. Please help.

2
Maven way: mvn exec:java -Dexec.mainClass=clojure.main, in a project with org.clojure:clojure as a dependency.jpaugh

2 Answers

2
votes

this must be a space issue in "Program Files". try to have the entire path quoted like this:

java -cp "C:\Program Files\clojure-1.6.0\clojure-1.6.0.jar" clojure.main

2
votes

I think you very likely want to install Leiningen.

You can then start a Clojure repl from anywhere with the command lein repl.

Note: lein takes care of getting and managing the Clojure jar for you --- you don't need to "install" Clojure. Just use lein and it takes care of everything. :)