...
Code Block | ||||
---|---|---|---|---|
| ||||
public static Class<?> findClass(String name) throws ClassNotFoundException { try { ClassLoader loader = Thread.currentThread().getContextClassLoader(); if (loader == null) { loader = ClassLoader.getSystemClassLoader(); } if (loader != null) { return Class.forName(name, false, loader); } } catch (ClassNotFoundException exception) { // useUse current class loader instead } catch (SecurityException exception) { // useUse current class loader instead } return Class.forName(name); } |
...
Code Block | ||||
---|---|---|---|---|
| ||||
public static Class<?> findClass(String name) throws ClassNotFoundException { checkPackageAccess(name); try { ClassLoader loader = Thread.currentThread().getContextClassLoader(); if (loader == null) { // canCan be null in IE (see 6204697) loader = ClassLoader.getSystemClassLoader(); } if (loader != null) { return Class.forName(name, false, loader); } } catch (ClassNotFoundException exception) { // useUse current class loader instead } catch (SecurityException exception) { // useUse current class loader instead } return Class.forName(name); } |
...