On Tuesday April 18, 2006 17:20, Marcel Ruff <[EMAIL PROTECTED]> wrote: > ... > > The java.util.logging.LogManager.java uses following code: > > Class clz = ClassLoader.getSystemClassLoader().loadClass(word); > > It seems the system class loader does not find my XbNotifyHandler > class even that it is definitely in the CLASSPATH, > i have also tried > <typedef > > <classpath> <pathelement location="..." > > with no success. > > But this is works fine: > Class clz = > Thread.currentThread().getContextClassLoader().loadClass(cname); > > but i can't change the java.util.logging code to use the > ContextClassLoader! > > How can i resolve this issue?
Ant loads classes and tasks using it's own classloader. If the java.util.logging code need to load a class using the system classloader, then the only way I know of to arrange this is to add it to the CLASSPATH environment variable *before* starting Ant. I'd suggest you also consider filing a bug with Sun about this. there are some places in LogManager.java where they try the System classloader and then fall back on the context classloader and some places they do not. I don't see any reason not to fall back to the context classloader in all cases. This would allow the java.util logging to work with Ant as well. - Rob --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]