-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -308,16 +308,18 @@ protected void executeInJvm(String className, List args, List cpEntries, boolean | |
} | ||
|
||
ClassLoader parent = null; | ||
/*try | ||
try | ||
{ | ||
parent = ClassLoader.getPlatformClassLoader(); | ||
Method method = ClassLoader.class.getMethod("getPlatformClassLoader", (Class)null); | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
andyjefferson
Author
Member
|
||
parent = (ClassLoader)method.invoke(null); | ||
getLog().debug("Java 9 or higher detected. Using modern classloader strategy."); | ||
} | ||
catch (NoSuchMethodError e) | ||
catch (Throwable thr) | ||
{ | ||
getLog().debug("Java 8 or older detected. Using legacy classloader strategy."); | ||
}*/ | ||
} | ||
URLClassLoader loader = new URLClassLoader(urls, parent); | ||
|
||
Class c = loader.loadClass(className); | ||
Method m = c.getMethod("main", new Class[] { String[].class }); | ||
ClassLoader tl = Thread.currentThread().getContextClassLoader(); | ||
|
It is still failing for Java 11 with this,
I think this needs to be changed this way to work with Java 11.