mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-11-15 03:31:15 +03:00
[FIX] Add ClassLoader.registerAsParallelCapable()
This commit is contained in:
parent
ef4f14f9b4
commit
4be299f6ca
2 changed files with 9 additions and 0 deletions
|
@ -54,6 +54,10 @@ private class LegacyClassLoader extends URLClassLoader {
|
||||||
private final Map<String, Class<?>> classMap = new ConcurrentHashMap<>();
|
private final Map<String, Class<?>> classMap = new ConcurrentHashMap<>();
|
||||||
private String nativePath;
|
private String nativePath;
|
||||||
|
|
||||||
|
static {
|
||||||
|
ClassLoader.registerAsParallelCapable();
|
||||||
|
}
|
||||||
|
|
||||||
private final List<String> packages = new ArrayList<>();
|
private final List<String> packages = new ArrayList<>();
|
||||||
public LegacyClassLoader(URL[] urls) {
|
public LegacyClassLoader(URL[] urls) {
|
||||||
super(urls);
|
super(urls);
|
||||||
|
|
|
@ -164,6 +164,11 @@ private class ModuleClassLoader extends URLClassLoader {
|
||||||
private String nativePath;
|
private String nativePath;
|
||||||
|
|
||||||
private final List<String> packages = new ArrayList<>();
|
private final List<String> packages = new ArrayList<>();
|
||||||
|
|
||||||
|
static {
|
||||||
|
ClassLoader.registerAsParallelCapable();
|
||||||
|
}
|
||||||
|
|
||||||
public ModuleClassLoader(URL[] urls, ClassLoader parent) {
|
public ModuleClassLoader(URL[] urls, ClassLoader parent) {
|
||||||
super("LAUNCHER", urls, parent);
|
super("LAUNCHER", urls, parent);
|
||||||
packages.add("pro.gravit.launcher.");
|
packages.add("pro.gravit.launcher.");
|
||||||
|
|
Loading…
Reference in a new issue