|
|
@ -46,8 +46,13 @@ public class LaunchedURLClassLoader extends URLClassLoader {
|
|
|
|
if (lastDot != -1) {
|
|
|
|
if (lastDot != -1) {
|
|
|
|
String packageName = name.substring(0, lastDot);
|
|
|
|
String packageName = name.substring(0, lastDot);
|
|
|
|
if (getPackage(packageName) == null) {
|
|
|
|
if (getPackage(packageName) == null) {
|
|
|
|
|
|
|
|
try {
|
|
|
|
definePackageForFindClass(name, packageName);
|
|
|
|
definePackageForFindClass(name, packageName);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
catch (Exception ex) {
|
|
|
|
|
|
|
|
// Swallow and continue
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return super.findClass(name);
|
|
|
|
return super.findClass(name);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -72,6 +77,7 @@ public class LaunchedURLClassLoader extends URLClassLoader {
|
|
|
|
if (jarFile.getManifest() != null
|
|
|
|
if (jarFile.getManifest() != null
|
|
|
|
&& jarFile.getJarEntry(path) != null) {
|
|
|
|
&& jarFile.getJarEntry(path) != null) {
|
|
|
|
definePackage(packageName, jarFile.getManifest(), url);
|
|
|
|
definePackage(packageName, jarFile.getManifest(), url);
|
|
|
|
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|