On Sat, Jun 27, 2009 at 2:34 AM, Laurent PETIT<laurent.pe...@gmail.com> wrote:
>
> While I'm far from a java classpath-related issues problem, I think I
> know enough to say that placing your libs in the java.ext.dirs
> classpath is a trick that could lead to problems.

I've been using it mainly because Rich has recommended it:

  http://clojure-log.n01se.net/date/2008-10-26.html#15:33
  http://clojure-log.n01se.net/date/2008-11-22.html#11:58

> It's primary and sole intent is to hold extensions to the java API
> that then would be loaded with the core java APIs.

Is there any documentation suggesting it should not be used
the way I'm using it?  The Sun docs I've read so far don't
seem to forbid it.
                
> That's certainly why you're having problems when you mess up the
> dependencies in places where there is a hierarchy of classloaders
> involved : clojure-contrib was loaded with the "main classloader"
> along with java core libraries, and clojure was loaded with a "child"
> classloader. And thus clojure-contrib classes were not able to see any
> of the classes in the child classloader.

I see.  But even this is not a problem when loading code
from .clj files instead of .class files, which may be why
I haven't run into it much.

...and actually doesn't it have to be a bit more complicated
than that?  Otherwise I would have been unable to load *any*
classes named only in the java.ext.dirs via the -cp-loaded
clojure REPL, right?

Anyway, I have a solution (in complete violation of your
warnings!) that's working nicely now. :-)  I have
a cp-common directory, as well as one or more cp-<proj>
dirs, where a <proj> can specify either just a clojure
branch (master, 1.0, chunks, or an application project I'm
working on.  In either case, it can contain a link to the
specific clojure jar I want.  For example, cp-1.0 can
include links to both clojure-1.0.jar and the 1.0 branch of
contrib (once it exists), while clojure-master can include
links to the lastest pull of each.

So is this still the wrong way?  Is the right way really to
launch ruby so I can launch clojure!?

--Chouser

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

Reply via email to