1 | loader = getProject().createClassLoader(classpath);↵ | | 1 | loader = getProject().createClassLoader(classpath);↵
|
2 | loader.setParentFirst(false);↵ | | 2 | loader.setParentFirst(false);↵
|
3 | loader.addJavaLibraries();↵ | | 3 | loader.addJavaLibraries();↵
|
4 | if (loader != null) {↵ | | 4 | if (loader != null) {↵
|
5 | try {↵ | | 5 | try {↵
|
6 | return loader.findClass(classname);↵ | | 6 | loader.findClass(classname);↵
|
7 | } catch (SecurityException se) {↵ | | 7 | } catch (SecurityException se) {↵
|
8 | // class found but restricted name; this is↵ | | 8 | // class found but restricted name; this is↵
|
9 | // actually the case we're looking for in JDK 1.3+,↵ | | 9 | // actually the case we're looking for in JDK 1.3+,↵
|
10 | // so catch the exception and return↵ | | 10 | // so catch the exception and return↵
|
11 | return null;↵ | | 11 | return true;↵
|
12 | }↵ | | 12 | }↵
|
13 | } else {↵ | | 13 | } else {↵
|
14 | return null;↵ | | 14 | return false;↵
|
15 | } | | 15 | }
|