diff --git a/src/Main.java b/src/Main.java index a8d599ea..f8e2f2fd 100644 --- a/src/Main.java +++ b/src/Main.java @@ -190,7 +190,7 @@ public static void dynamicLoadJar(String fileName) throws IOException { Method method = sysclass.getDeclaredMethod("addURL", URL.class); method.setAccessible(true); - method.invoke(sysloader, sysloader.getResource("minecraft_server.jar")); + method.invoke(sysloader, (new File(fileName)).toURI().toURL()); } catch (Exception ex) { log.log(Level.SEVERE, "Could not add URL to class loader", ex); System.exit(1);