1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
|
Description: Don't use Red5 internal bootstraping system.
Rely on current classpath only.
Forwarded: no
Origin: vendor
Author: Damien Raude-Morvan <drazzib@debian.org>
Last-Update: 2009-10-03
--- a/src/org/red5/server/Bootstrap.java
+++ b/src/org/red5/server/Bootstrap.java
@@ -120,22 +120,25 @@
*/
//get current loader
- ClassLoader baseLoader = Thread.currentThread().getContextClassLoader();
+ //ClassLoader baseLoader = Thread.currentThread().getContextClassLoader();
// build a ClassLoader
- ClassLoader loader = ClassLoaderBuilder.build();
+ //ClassLoader loader = ClassLoaderBuilder.build();
//set new loader as the loader for this thread
- Thread.currentThread().setContextClassLoader(loader);
+ //Thread.currentThread().setContextClassLoader(loader);
// create a new instance of this class using new classloader
- Object boot = Class.forName("org.red5.server.Launcher", true, loader).newInstance();
+ //Object boot = Class.forName("org.red5.server.Launcher", true, loader).newInstance();
- Method m1 = boot.getClass().getMethod("launch", (Class[]) null);
- m1.invoke(boot, (Object[]) null);
+ //Method m1 = boot.getClass().getMethod("launch", (Class[]) null);
+ //m1.invoke(boot, (Object[]) null);
//not that it matters, but set it back to the original loader
- Thread.currentThread().setContextClassLoader(baseLoader);
+ //Thread.currentThread().setContextClassLoader(baseLoader);
+
+ org.red5.server.Launcher launcher = new org.red5.server.Launcher();
+ launcher.launch();
}
/**
|