本文整理匯總了Java中org.insightech.er.util.URLFirstClassLoader類的典型用法代碼示例。如果您正苦於以下問題:Java URLFirstClassLoader類的具體用法?Java URLFirstClassLoader怎麽用?Java URLFirstClassLoader使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
URLFirstClassLoader類屬於org.insightech.er.util包,在下文中一共展示了URLFirstClassLoader類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getClassLoader
import org.insightech.er.util.URLFirstClassLoader; //導入依賴的package包/類
public static ClassLoader getClassLoader() {
ClassLoader currentClassLoader = ERDiagramActivator.class
.getClassLoader();
String path = PreferenceInitializer.getExtendedClasspath();
if (!Check.isEmpty(path)) {
URL[] urls = new URL[1];
try {
urls[0] = new File(path + "/").toURI().toURL();
URLFirstClassLoader classLoader = new URLFirstClassLoader(urls,
currentClassLoader);
return classLoader;
} catch (MalformedURLException e) {
}
}
return currentClassLoader;
}
示例2: getClassLoader
import org.insightech.er.util.URLFirstClassLoader; //導入依賴的package包/類
public static ClassLoader getClassLoader() {
final ClassLoader currentClassLoader = ERDiagramActivator.class.getClassLoader();
final String path = PreferenceInitializer.getExtendedClasspath();
if (!Check.isEmpty(path)) {
final URL[] urls = new URL[1];
try {
urls[0] = new File(path + "/").toURI().toURL();
final URLFirstClassLoader classLoader = new URLFirstClassLoader(urls, currentClassLoader);
return classLoader;
} catch (final MalformedURLException e) {}
}
return currentClassLoader;
}