Fixed #3902
This commit is contained in:
@@ -22,8 +22,8 @@ public interface Platform{
|
|||||||
|
|
||||||
/** Dynamically loads a jar file. */
|
/** Dynamically loads a jar file. */
|
||||||
default Class<?> loadJar(Fi jar, String mainClass) throws Exception{
|
default Class<?> loadJar(Fi jar, String mainClass) throws Exception{
|
||||||
URLClassLoader classLoader = new URLClassLoader(new URL[]{jar.file().toURI().toURL()}, ClassLoader.getSystemClassLoader());
|
URLClassLoader classLoader = new URLClassLoader(new URL[]{jar.file().toURI().toURL()}, getClass().getClassLoader());
|
||||||
return classLoader.loadClass(mainClass);
|
return Class.forName(mainClass, true, classLoader);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Steam: Update lobby visibility.*/
|
/** Steam: Update lobby visibility.*/
|
||||||
|
|||||||
Reference in New Issue
Block a user