C
Cory
I have a directory full of classes, all that implement a common
interface. All of the class files have different package names that I
do not know.
My question is, how do I call the URLClassLoader.loadClass() method to
instantiate a new instance if I don't know the package name?
ex: All I know is that the file's name is MyClass.class.
package com.hey.now;
public class MyClass implements someInterface {
....
}
I just want to say Object o =
(someInterface)myLoader.loadClass(myClass);
any ideas??
Thanks in advance!
interface. All of the class files have different package names that I
do not know.
My question is, how do I call the URLClassLoader.loadClass() method to
instantiate a new instance if I don't know the package name?
ex: All I know is that the file's name is MyClass.class.
package com.hey.now;
public class MyClass implements someInterface {
....
}
I just want to say Object o =
(someInterface)myLoader.loadClass(myClass);
any ideas??
Thanks in advance!