Hi all,

I'm struggling a bit with how best to organize and bootstrap a
multiple-source file project so that it can be run either command-line
(java -cp clojure.jar:myapp.jar ...) or by running a load method from
the REPL without having to explicitly change the classpath in my
user.clj before running.

Currently my file structure looks like this:

/bootstrap.clj
/package1/foo.clj
/package2/bar.clj

And bootstrap.clj looks something like:

(def *namespaces*
  '("package1/foo" "package2/bar"))

(defn load []
  (for [namespace *namespaces*]
    (load namespace)))

This seems to work sometimes, if my REPL's "working directory" is /
(relative to my project), but not if it's anything else (get a
java.io.FileNotFoundException).

So, I guess my question is: is this whole approach silly and is there
a better way to bootstrap a multiple file/package project? If not, how
best to tweak this?

-Greg


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

Reply via email to