On Jul 2, 5:20 am, Brian Schlining <bschlin...@gmail.com> wrote: > > > There's URLClassLoader for loading classes at runtime. Javadocs are > > athttp://java.sun.com/javase/6/docs/api/java/net/URLClassLoader.html. > > There's > > > an old thread about using it athttp:// > > forums.sun.com/thread.jspa?threadID=300557&start=0&tstart=0 > > > Using a classloader manually is sub-optimal because the rest of > > Clojure, which doesn't know anything about the user-created > > classloader, wouldn't use it to load classes; you'd have to use the > > reflection API yourself to manipulate them. > > That's normally true, but if you look at the thread reference above it shows > you how to 'hack' the system classloader, so you can use the classes as if > they were loaded normally (on JVM startup)
That's too much of a hack for my tastes, and it will only work for stand-alone applications (possibly only on certain JVMs). > > > 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. > > > There's a reason for that being discouraged: if you install a new > > version of the JRE/JDK, you'll have to copy your jars there by hand. > > Since Java auto-updates itself, at least on Windows, that's quite > > dangerous. > > I agree it should be discouraged. Just FYI though, the current releases of > Java on Windows auto-updates in place. So any jars you put in lib/ext will > still be there after the update. On Macs, Java updates have no effect on > /Library/Java/Extensions. Ok, I stand corrected. I haven't been touching Windows for a while :) Cheers, Alessio -- 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