tags:

views:

121

answers:

1

I found that I can use Chris Houser's repl-utils library (clojure.contrib.repl-utils/source or show) for poking into Java by reading Programming Clojure book page 20.

I searched the web and downloaded the 'clojure-contrib.jar', and set it as a part of classpath.

The problem is I can't run the following command

(use 'clojure.contrib.repl-utils)

on both command line clojure and emacs/slime.

What might be wrong? Is Chirs Houser's library is different from 'clojure-contrib.jar'?

FOUND A SOLUTION

I asked and got some answers.

In short, - it's OK to have it require, but gives me an error to refer. As a result, I need to use as follows

user=> (require 'clojure.contrib.repl-utils)
user=> (clojure.contrib.repl-utils/expression-info '(+ 1 2))
{:class java.lang.Number, :primitive? false}
+1  A: 

it works for me, we need more information to help you: what happend exactly when you run it? does it raise an error?

jneira