diff options
author | Simon Rettberg | 2014-06-04 16:31:05 +0200 |
---|---|---|
committer | Simon Rettberg | 2014-06-04 16:31:05 +0200 |
commit | 562bb36b34abdc2eeb0b02eef60d5d7398e24518 (patch) | |
tree | f2a81abc408645577a52a34b4e9df1ab0dc5ce71 /daemon | |
parent | Quick README (diff) | |
download | taskman-lite-562bb36b34abdc2eeb0b02eef60d5d7398e24518.tar.gz taskman-lite-562bb36b34abdc2eeb0b02eef60d5d7398e24518.tar.xz taskman-lite-562bb36b34abdc2eeb0b02eef60d5d7398e24518.zip |
Rework plugin loading a little
Diffstat (limited to 'daemon')
-rw-r--r-- | daemon/src/main/java/org/openslx/taskmanager/App.java | 3 | ||||
-rw-r--r-- | daemon/src/main/java/org/openslx/taskmanager/util/ClassLoaderHack.java | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/daemon/src/main/java/org/openslx/taskmanager/App.java b/daemon/src/main/java/org/openslx/taskmanager/App.java index c233229..86cae4d 100644 --- a/daemon/src/main/java/org/openslx/taskmanager/App.java +++ b/daemon/src/main/java/org/openslx/taskmanager/App.java @@ -20,7 +20,9 @@ public class App public static void main( String[] args ) throws SocketException { + BasicConfigurator.configure(); // Load all task plugins + Thread.currentThread().setContextClassLoader( ClassLoader.getSystemClassLoader() ); File folder = new File( "./plugins" ); if ( !folder.exists() ) { System.out.println( "No plugin folder found - nothing to do." ); @@ -37,7 +39,6 @@ public class App System.exit( 1 ); } } - BasicConfigurator.configure(); Environment.load( "config/environment" ); NetworkHandler.init(); Taskmanager.run(); diff --git a/daemon/src/main/java/org/openslx/taskmanager/util/ClassLoaderHack.java b/daemon/src/main/java/org/openslx/taskmanager/util/ClassLoaderHack.java index 1a02ff7..0a3160c 100644 --- a/daemon/src/main/java/org/openslx/taskmanager/util/ClassLoaderHack.java +++ b/daemon/src/main/java/org/openslx/taskmanager/util/ClassLoaderHack.java @@ -53,7 +53,7 @@ public class ClassLoaderHack { final Class<?> clazz; try { - clazz = Class.forName( packageName + '.' + className, true, ClassLoader.getSystemClassLoader() ); + clazz = Class.forName( packageName + '.' + className ); } catch ( ClassNotFoundException e ) { return null; } |