jeudi 5 juillet 2018

Jar not starting when calling newInstance using reflection

Im attempting to load/run a OperatingSystem manager tool. My main goal is to tweak some of the UI colors and such for a fun learning experience. It is an opensource program so there is no issues there.

Ive tried

private URLClassLoader classLoader;

URL osmanURL = new URL("file:///C:\\Users\\Me\\EmbahDev\\OSManager.jar");
classLoader = new URLClassLoader(new URL[] { osmanURL });
Class<?> clz = classLoader.loadClass("org.osman.Boot");
Object bootLoader = clz.newInstance();

but it wont display the main gui screen of OSManager when it runs. Although no errors arise.

Thank you for your help!





Aucun commentaire:

Enregistrer un commentaire