For more than just experimentation with one file, you might also want to look into lib packaging so that you can 'require' or 'use' rather than have to go down to the level of 'load' or 'load-file'. Quick summary, if your file has namespace "foo.bar" then package it in file / foo/bar.clj (relative to your classpath) and you can then just (require 'foo.bar) or (use 'foo.bar)
See this thread for more discussion (I had this question not too long ago): http://groups.google.com/group/clojure/browse_thread/thread/f29913ee38e7930a/910434de5dc460cf?lnk=gst&q=bootstrap#910434de5dc460cf -Greg > 2009/1/14 Onorio Catenacci <catena...@gmail.com> > > > > > Hi all, > > > I'm new to Clojure and new to Lisp but not new to software > > development. And I feel very dumb for having to ask what seems like a > > very noob question but I can't seem to figure this out. > > > If I want to load a source file into REPL it seems that I should be > > able to do this: > > > (load-file "filename") > > > but when I try this with a source file in a folder on my Windows XP > > box, > > > (load-file "/cljhack/test1.clj") > > > I get > > > "java.lang.Exception: Invalid token: /cljhack/test1.clj" (less the > > quotes of course). --~--~---------~--~----~------------~-------~--~----~ 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 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 -~----------~----~----~----~------~----~------~--~---