Hi,

I'm trying to add a classpath to the current Clojure REPL session on the
fly. (Particularly, I extracted shcloj-code.tgz of Programming Clojure
to /tmp/code directory, and trying to load /tmp/code/examples/snake.clj
file.) For this purpose, I tried below two steps with no luck.

- (System/setProperty
   "java.class.path"
   (str (System/getProperty "java.class.path")
        ":/tmp/code"))

- (add-classpath "file:///tmp/code")

But after both tries Clojure complains that "Could not locate
examples/snake__init.class or examples/snake.clj on classpath". Am I
missing something obvious, or it's not possible to introduce new
classpaths on the fly?

BTW, after

  (add-classpath "file:///tmp/code")

call,

  (System/getProperty "java.class.path")

appears to be unchanged. Is that something expected?


Regards.

--~--~---------~--~----~------------~-------~--~----~
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