Question

I normally use Emacs but was inspired to try CCW + Eclipse again. I have a Clojure test project with a source file src/user.clj with the following contents:

(ns user)

(println "hi")

I have a REPL which I started with Window->Show View->Other->Clojure Views->REPL.

When I select the println expression (all of '(println "hi")') and hit Command-enter, the expression itself gets echoed in the REPL window, but no output occurs. Similar with expressions like '(take 10 (range))'.

If I type the expression in the REPL directly, and hit Enter, I get

=> (take 10 (range))

but there doesn't seem to be any additional output of the evaluation.

Thanks for any ideas. I looked over the docs but nothing obvious jumped out at me.

Was it helpful?

Solution

You need to be connected to a REPL to get a response.

There are two options:

  • Connect to an existing REPL
  • Run your project as a Clojure application and automatically connect to it's REPL.

To connect to an existing REPL, you can use Window -> Connect to REPL.

To run your project, Right click your project; Run As -> Clojure Application. If that's not an option, Right Click -> Configure -> As Clojure Application

OTHER TIPS

Sounds like your REPL is disconnected - it needs to be connected to a running Clojure process in order for you to interact with the live environment.

I usually just launch a REPL and load the file simultaneously by pressing Ctrl-Alt-L in the code editor window.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top