On Nov 24, 7:52 pm, Perry Trolard <[EMAIL PROTECTED]> wrote:
> Right, good idea. It would just take checking to see if the "path"
> variable is in System.getProperty("java.class.path"), right?
...
> Answer: no. I tried the approach below against Stephen's
> clojure.lang.Compile, & the ant build process failed. All of the
> classes currently on the classpath are evidently not reflected in the
> system property -- at least when running in Ant. (I believe they would
> be when invoking java w/ the -cp option.)

I think it's because of different string representations of the path
(e.g. the path variable may be "./classes" but the classpath (under
Ant) is "/home/bob/project/classes".  It probably need something like
this:

File pathFile = new File(path);
for (String cp : System.getProperty("java.class.path").split(":")) {
    File cpFile = new File(cp);
    if (pathFile.equals(cpFile)) {
        found = true;
        break;
    }
}

-Stuart Sierra
--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to