Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoakim Erdfelt2014-11-04 22:03:46 +0000
committerJoakim Erdfelt2014-11-04 22:04:30 +0000
commit04fc803b0e1f8fed295dbff73c77b192f23392bc (patch)
treea310df866b1a7f1a5d8e01ce2e659f71577b9e69 /jetty-start
parent5d0595cabdd853f37b2357cb5c4115703eb3a975 (diff)
downloadorg.eclipse.jetty.project-04fc803b0e1f8fed295dbff73c77b192f23392bc.tar.gz
org.eclipse.jetty.project-04fc803b0e1f8fed295dbff73c77b192f23392bc.tar.xz
org.eclipse.jetty.project-04fc803b0e1f8fed295dbff73c77b192f23392bc.zip
448446 - org.eclipse.jetty.start.Main create classloader duplicate
+ Reuse ClassLoader instead.
Diffstat (limited to 'jetty-start')
-rw-r--r--jetty-start/src/main/java/org/eclipse/jetty/start/Main.java9
1 files changed, 3 insertions, 6 deletions
diff --git a/jetty-start/src/main/java/org/eclipse/jetty/start/Main.java b/jetty-start/src/main/java/org/eclipse/jetty/start/Main.java
index 6c98886707..eca1f7929f 100644
--- a/jetty-start/src/main/java/org/eclipse/jetty/start/Main.java
+++ b/jetty-start/src/main/java/org/eclipse/jetty/start/Main.java
@@ -289,10 +289,9 @@ public class Main
return "";
}
- public void invokeMain(StartArgs args) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException, ClassNotFoundException, IOException
+ public void invokeMain(ClassLoader classloader, StartArgs args) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException, ClassNotFoundException, IOException
{
Class<?> invoked_class = null;
- ClassLoader classloader = args.getClasspath().getClassLoader();
String mainclass = args.getMainClassname();
try
@@ -317,8 +316,7 @@ public class Main
{ argArray.getClass() };
Method main = invoked_class.getDeclaredMethod("main",method_param_types);
- Object[] method_params = new Object[]
- { argArray };
+ Object[] method_params = new Object[] { argArray };
StartLog.endStartLog();
main.invoke(null,method_params);
}
@@ -810,14 +808,13 @@ public class Main
System.err.println("WARNING: System properties and/or JVM args set. Consider using --dry-run or --exec");
}
- // Set current context class loader to what is selected.
ClassLoader cl = classpath.getClassLoader();
Thread.currentThread().setContextClassLoader(cl);
// Invoke the Main Class
try
{
- invokeMain(args);
+ invokeMain(cl, args);
}
catch (Exception e)
{

Back to the top