| 85 | |
| 86 | |
| 87 | public static void addJar(File jarPath) { |
| 88 | try { |
| 89 | URLClassLoader classLoader = (URLClassLoader)FXMLDocumentController.class.getClassLoader(); |
| 90 | Method method = URLClassLoader.class.getDeclaredMethod("addURL", URL.class); |
| 91 | if (!method.isAccessible()) { |
| 92 | method.setAccessible(true); |
| 93 | } |
| 94 | |
| 95 | URL url = jarPath.toURI().toURL(); |
| 96 | method.invoke(classLoader, url); |
| 97 | } catch (Exception var4) { |
| 98 | var4.printStackTrace(); |
| 99 | } |
| 100 | |
| 101 | } |
| 102 | |
| 103 | |
| 104 | public static Object invoke(Object obj, String methodName, Object... parameters) { |