Here is a line from the current source code:
final Class<?> cls = Class.forName(mainClass, true, ClassLoader.getSystemClassLoader());
|
final Class<?> cls = Class.forName(mainClass, true, ClassLoader.getSystemClassLoader()); |
This code is called when loading the craftbukkit main method and uses the SystemClassLoader to load those classes. If a developer now wants to load paperclip, craftbukkit and all those classes with a custom ClassLoader this single line ruins that for him, since Java tries (reasonably) a lot, to make it impossible to change the SystemClassLoader.
I would suggest to change the part ClassLoader.getSystemClassLoader() to Perpclip.class.getClassLoader() so that custom class loaders can be used to load the bukkit and minecraft classes
Here is a line from the current source code:
final Class<?> cls = Class.forName(mainClass, true, ClassLoader.getSystemClassLoader());Paperclip/java8/src/main/java/io/papermc/paperclip/Paperclip.java
Line 227 in 2d4c7b3
This code is called when loading the craftbukkit main method and uses the SystemClassLoader to load those classes. If a developer now wants to load paperclip, craftbukkit and all those classes with a custom ClassLoader this single line ruins that for him, since Java tries (reasonably) a lot, to make it impossible to change the SystemClassLoader.
I would suggest to change the part
ClassLoader.getSystemClassLoader()toPerpclip.class.getClassLoader()so that custom class loaders can be used to load the bukkit and minecraft classes