mardi 16 avril 2019

How can I reflect a process I built with getRuntime.exec?

I have to reflect a program so I can use it's fields and methods. My current project does this with URLClassLoader. I cant use this though, I need an alternative.

            Process p = Runtime.getRuntime().exec("\"C:\\Program Files (x86)\\Java\\jre1.8.0_201\\bin\\java.exe\" -Dcom.jagex.config=http://oldschool1.runescape.com/jav_config.ws -jar C:\\Users\\Administrator\\jagexcache\\jagexlauncher\\bin\\jagexappletviewer.jar \"oldschool\"");
            Thread.sleep(20000);
            Field field = p.getClass().getDeclaredField("client");
            field.setAccessible(true);
            System.out.println("This is the field: " + field);





Aucun commentaire:

Enregistrer un commentaire