|
|
@ -121,6 +121,8 @@ public class PropertiesLauncher extends Launcher {
|
|
|
|
|
|
|
|
|
|
|
|
private static final Pattern WORD_SEPARATOR = Pattern.compile("\\W+");
|
|
|
|
private static final Pattern WORD_SEPARATOR = Pattern.compile("\\W+");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private static final URL[] EMPTY_URLS = {};
|
|
|
|
|
|
|
|
|
|
|
|
private final File home;
|
|
|
|
private final File home;
|
|
|
|
|
|
|
|
|
|
|
|
private List<String> paths = new ArrayList<String>(DEFAULT_PATHS);
|
|
|
|
private List<String> paths = new ArrayList<String>(DEFAULT_PATHS);
|
|
|
@ -493,9 +495,7 @@ public class PropertiesLauncher extends Launcher {
|
|
|
|
private void addParentClassLoaderEntries(List<Archive> lib) throws IOException,
|
|
|
|
private void addParentClassLoaderEntries(List<Archive> lib) throws IOException,
|
|
|
|
URISyntaxException {
|
|
|
|
URISyntaxException {
|
|
|
|
ClassLoader parentClassLoader = getClass().getClassLoader();
|
|
|
|
ClassLoader parentClassLoader = getClass().getClassLoader();
|
|
|
|
if (parentClassLoader instanceof URLClassLoader) {
|
|
|
|
for (URL url : getURLs(parentClassLoader)) {
|
|
|
|
URLClassLoader urlClassLoader = (URLClassLoader) parentClassLoader;
|
|
|
|
|
|
|
|
for (URL url : urlClassLoader.getURLs()) {
|
|
|
|
|
|
|
|
if (url.toString().endsWith(".jar") || url.toString().endsWith(".zip")) {
|
|
|
|
if (url.toString().endsWith(".jar") || url.toString().endsWith(".zip")) {
|
|
|
|
lib.add(0, new JarFileArchive(new File(url.toURI())));
|
|
|
|
lib.add(0, new JarFileArchive(new File(url.toURI())));
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -513,6 +513,12 @@ public class PropertiesLauncher extends Launcher {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private URL[] getURLs(ClassLoader classLoader) {
|
|
|
|
|
|
|
|
if (classLoader instanceof URLClassLoader) {
|
|
|
|
|
|
|
|
return ((URLClassLoader) classLoader).getURLs();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return EMPTY_URLS;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private String cleanupPath(String path) {
|
|
|
|
private String cleanupPath(String path) {
|
|
|
|