fix getting the ParallelLoaders class
All checks were successful
/ Build BaseBand Loader (push) Successful in 1m11s
All checks were successful
/ Build BaseBand Loader (push) Successful in 1m11s
This commit is contained in:
parent
31ff41f96e
commit
1da1c2d96b
1 changed files with 2 additions and 1 deletions
|
@ -17,6 +17,7 @@ import java.lang.reflect.Field;
|
|||
import java.lang.reflect.Method;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
|
||||
|
@ -67,7 +68,7 @@ public class CustomClassLoader extends ClassLoader implements Util {
|
|||
throw new IllegalStateException(MixinService.getService().getClass().toString());
|
||||
}
|
||||
|
||||
Method m = Class.forName("java.lang.ClassLoader.ParallelLoaders").getDeclaredMethod("register", Class.class);
|
||||
Method m = Arrays.stream(Class.forName("java.lang.ClassLoader").getDeclaredClasses()).filter(x -> x.getSimpleName().equalsIgnoreCase("ParallelLoaders")).findFirst().get().getDeclaredMethod("register", Class.class);
|
||||
m.setAccessible(true);
|
||||
m.invoke(null, CustomClassLoader.class);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue