String str = classUrl.getFile(); // strips "jar:", of if starting with "file:" the "file:" which we don't want
if (!str.startsWith("file:")) str = classUrl.toString();
log.fine("Looking up CLASSPATH directory with write access for '" + str + "'");
try {
File f = new File(new URI(str));
// org.xmlBlaster.util.classloader.StandaloneClassLoaderFactory
if (f.getAbsolutePath().endsWith("org/xmlBlaster/util/classloader/StandaloneClassLoaderFactory.class"))
f = f.getParentFile().getParentFile().getParentFile().getParentFile().getParentFile();
return directoryForWrite(f.getAbsolutePath());
} catch (Throwable e) { // IllegalArgumentException or URISyntaxException