dev@glassfish.java.net

[v3] Can't I rely on getURLs() anymore?

From: Kin-man Chung <Kin-Man.Chung_at_Sun.COM>
Date: Mon, 09 Jun 2008 16:07:30 -0700

In Jasper, to set the classpath for the Java compiler, we have been
using the following algorithm (simplified):

    loader = currentThread.getContextLoader();
    while (loader != null) {
       for (URLClassLoader cl: loader.getURLs()) {
          classpath.append(cl);
       }
       loader = loader.getParent();
    }

This no longer works in V3. Jasper is now a separate module, and
the classpath so obtained does not include jasper.jar itself!

I'd appreciate any light that can shed on this issue.

-Kin-man