Commit 562bb36b authored by Simon Rettberg's avatar Simon Rettberg
Browse files

Rework plugin loading a little

No related merge requests found
Showing with 3 additions and 2 deletions
+3 -2
......@@ -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();
......
......@@ -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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment