How to create Class.forName("some package")
which is not avalible in current package but it is running in the same JVM?
String jsConfigUpdatePkg = "com.baidu.openrasp.config.JSConfigUpdate";
Class<?> jcConfigClass = Class.forName(jsConfigUpdatePkg); // convert string classname to class
Class[] argTypes = new Class[] { String[].class };
Method updateConfigMethod = jcConfigClass.getDeclaredMethod("updateConfig", argTypes);
I'm getting ClassNotFoundException
while doing Class.forName("some package")
Aucun commentaire:
Enregistrer un commentaire