From 16ff4a3173f3373aae5a267346f5873ad35d7c1e Mon Sep 17 00:00:00 2001 From: Decebal Suiu Date: Wed, 20 Feb 2013 10:47:14 +0200 Subject: [PATCH] fix a issue with PluginClassLoader and javax. package --- pf4j/src/main/java/ro/fortsoft/pf4j/PluginClassLoader.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pf4j/src/main/java/ro/fortsoft/pf4j/PluginClassLoader.java b/pf4j/src/main/java/ro/fortsoft/pf4j/PluginClassLoader.java index 80832bc..60c79ca 100644 --- a/pf4j/src/main/java/ro/fortsoft/pf4j/PluginClassLoader.java +++ b/pf4j/src/main/java/ro/fortsoft/pf4j/PluginClassLoader.java @@ -23,8 +23,8 @@ import java.util.List; */ public class PluginClassLoader extends URLClassLoader { - private static final String JAVA_PACKAGE_PREFIX = "java."; - private static final String JAVAX_PACKAGE_PREFIX = "javax."; +// private static final String JAVA_PACKAGE_PREFIX = "java."; +// private static final String JAVAX_PACKAGE_PREFIX = "javax."; private static final String PLUGIN_PACKAGE_PREFIX = "ro.fortsoft.pf4j."; private PluginManager pluginManager; @@ -46,10 +46,13 @@ public class PluginClassLoader extends URLClassLoader { public Class loadClass(String className) throws ClassNotFoundException { // System.out.println(">>>" + className); + /* + // javax.mail is not in JDK ?! // first check whether it's a system class, delegate to the system loader if (className.startsWith(JAVA_PACKAGE_PREFIX) || className.startsWith(JAVAX_PACKAGE_PREFIX)) { return findSystemClass(className); } + */ // second check whether it's already been loaded Class loadedClass = findLoadedClass(className); -- 2.39.5