> I think you may be working at too low a level with "load". You should > be able to accomplish the same thing with: > > (ns my-app > (:require package1 package2)) > > (package2/start-app) > > my_app, package1, and package2 all need to be immediately under a > directory (or JAR file) on the Java classpath. Also check out the Ant > build.xml files from Clojure core and clojure-contrib.
The problem with this is that now you have to repeat your classpath in two places: your SLIME config and the shell script that you use to launch your app. This is a DRY[1] violation. One solution would be to load a single file and then have that file use add-classpath to set the classpath, but add-classpath is unreliable; I've had problems getting it to work consistently and have been told in #clojure that I shouldn't be using it. My solution for the time being is to always launch via SLIME and consider that method of launching it canonical, essentially deprecating the method of launching it from the shell. But obviously this is not ideal because for some reason not everyone uses Emacs. =) Clearly the classpath belongs in the codebase so it can be used independently of how the application was launched. There's got to be a way around this problem, but I haven't found it yet. -Phil [1] - http://en.wikipedia.org/wiki/Don%27t_repeat_yourself --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---