mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-07 05:31:22 +00:00
Fixed problem in class loader. Modified to use Class.forName()
This commit is contained in:
@@ -52,6 +52,11 @@ public class GuacamoleClassLoader extends ClassLoader {
|
|||||||
exception = e;
|
exception = e;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
catch (NullPointerException e) {
|
||||||
|
// On error, record exception
|
||||||
|
e.printStackTrace(System.err);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private GuacamoleClassLoader(File libDirectory) throws GuacamoleException {
|
private GuacamoleClassLoader(File libDirectory) throws GuacamoleException {
|
||||||
@@ -113,9 +118,9 @@ public class GuacamoleClassLoader extends ClassLoader {
|
|||||||
@Override
|
@Override
|
||||||
protected Class<?> findClass(String name) throws ClassNotFoundException {
|
protected Class<?> findClass(String name) throws ClassNotFoundException {
|
||||||
|
|
||||||
// If no classloader, use super
|
// If no classloader, use default loader
|
||||||
if (classLoader == null)
|
if (classLoader == null)
|
||||||
return super.findClass(name);
|
return Class.forName(name);
|
||||||
|
|
||||||
// Otherwise, delegate
|
// Otherwise, delegate
|
||||||
return classLoader.loadClass(name);
|
return classLoader.loadClass(name);
|
||||||
|
Reference in New Issue
Block a user