自己定义了一个classloader,
Class c = myLoader1.loadClass(
"test.loader.TestMyLoader2");
Object t= c.newInstance();
现在怎么把这个Object类型的对象转换成test.loader.TestMyLoader2类型?
Class c = myLoader1.loadClass(
"test.loader.TestMyLoader2");
Object t= c.newInstance();
现在怎么把这个Object类型的对象转换成test.loader.TestMyLoader2类型?
test.loader.TestMyLoader2 testMyLoader2 = (test.loader.TestMyLoader2)t;
就可以。