> > > > Where I struggle is with the practicalities of managing the classpath. > From what I can tell, there is no way of modifying the classpath from > a running Java/Clojure program (barring use of a custom classloader > which sounds like deep magic). >
There's URLClassLoader for loading classes at runtime. Javadocs are at http://java.sun.com/javase/6/docs/api/java/net/URLClassLoader.html. There's an old thread about using it at http://forums.sun.com/thread.jspa?threadID=300557&start=0&tstart=0 Groovy has a very elegant solution for adding dependencies (from Maven and Ivy repos) to scripts. See http://groovy.codehaus.org/Grapes+and+grab(). If some astute Clojure hacker with far more time than I were to grok the grape code and create a similar dependency engine for Clojure, well it would greatly expand Clojure's use for scripting and likely solve many of the issues you're finding with CLASSPATH > Python doesn't have these issues because (a) conventionally, > dependencies are installed into the site-packages directory which is > on the standard sys.path - it appears to me that the JVM doesn't have > such an "always available" install location, > Actually there is such a thing. For most JRE's/JDK's drop the 'always-available-jars' in JRE_HOME/lib/ext. On Mac's you would place them in /Library/Java/Extensions. Keep in mind that this is generally discouraged in favor of setting the classpath on a per-application basis. -- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Brian Schlining bschlin...@gmail.com -- 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