Two things:

a) You are running an example written for Clojure 1.2.1 but you try to run it 
with 1.3.0.
   This is likely to create problems by itself.

b) You did not specify the clojure contrib library on your class path. Note that
   the clojure contrib predating 1.3 (contrib version 1.2) is not
   compatible with Clojure 1.3.

Download Clojure 1.2.1 and the 1.2 contrib kit from here 
http://clojure.org/downloads

And then add contrib to the Java classpath as follow:

C:\clojure-1.2.1>java -cp c:/clojure-contrib-1.2/clojure-contrib-1.2.jar -jar 
c:/clojure-1.2.1/clojure-1.2.1.jar c:/clojure-1.2.1/examples/snake.clj

I am assuming that contrib will expand in clojure-contrib-1.2 and that the jar 
will be named clojure-contrib-1.2.jar
but check the actual names and substitute them accordingly in the command line 
above.

Luc

On Wed, 28 Sep 2011 22:52:38 -0700 (PDT)
jayvandal <s...@ida.net> wrote:

> I installed clojure from Programming Clojure page 12.
> I try to run snake.clj.
> This is what I get
> What causes this??
> Thanks
> ==========================================================
> 
> C:\clojure-1.3.0>java -jar c:/clojure-1.3.0/clojure-1.3.0.jar 
> c:/clojure-1.2.1/e
> xamples/snake.clj
> Exception in thread "main" java.lang.RuntimeException: 
> java.io.FileNotFoundExcep
> tion: Could not locate clojure/contrib/import_static__init.class or 
> clojure/cont
> rib/import_static.clj on classpath:
>         at clojure.lang.Util.runtimeException(Util.java:165)
>         at clojure.lang.Compiler.eval(Compiler.java:6476)
>         at clojure.lang.Compiler.eval(Compiler.java:6455)
>         at clojure.lang.Compiler.load(Compiler.java:6902)
>         at clojure.lang.Compiler.loadFile(Compiler.java:6863)
>         at clojure.main$load_script.invoke(main.clj:282)
>         at clojure.main$script_opt.invoke(main.clj:342)
>         at clojure.main$main.doInvoke(main.clj:426)
>         at clojure.lang.RestFn.invoke(RestFn.java:408)
>         at clojure.lang.Var.invoke(Var.java:401)
>         at clojure.lang.AFn.applyToHelper(AFn.java:161)
>         at clojure.lang.Var.applyTo(Var.java:518)
>         at clojure.main.main(main.java:37)
> Caused by: java.io.FileNotFoundException: Could not locate 
> clojure/contrib/impor
> t_static__init.class or clojure/contrib/import_static.clj on
> classpath: at clojure.lang.RT.load(RT.java:430)
>         at clojure.lang.RT.load(RT.java:398)
>         at clojure.core$load$fn__4610.invoke(core.clj:5386)
>         at clojure.core$load.doInvoke(core.clj:5385)
>         at clojure.lang.RestFn.invoke(RestFn.java:408)
>         at clojure.core$load_one.invoke(core.clj:5200)
>         at clojure.core$load_lib.doInvoke(core.clj:5237)
>         at clojure.lang.RestFn.applyTo(RestFn.java:142)
>         at clojure.core$apply.invoke(core.clj:602)
>         at clojure.core$load_libs.doInvoke(core.clj:5271)
>         at clojure.lang.RestFn.applyTo(RestFn.java:137)
>         at clojure.core$apply.invoke(core.clj:604)
>         at clojure.core$use.doInvoke(core.clj:5363)
>         at clojure.lang.RestFn.invoke(RestFn.java:421)
>         at
> examples.snake$eval3$loading__4505__auto____4.invoke(snake.clj:8) at
> examples.snake$eval3.invoke(snake.clj:8) at
> clojure.lang.Compiler.eval(Compiler.java:6465) ... 11 more
> 
> C:\clojure-1.3.0>
> 



-- 
Luc P.

================
The rabid Muppet

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to