public static void run(String name) {
try {
System.out.println(name);
Class s = Class.forName(name);
Method m = s.getMethod("start");
m.invoke(s.newInstance());
} catch (Exception ex) {
}
}
I'm trying to run a method from another class.
name = path of the class im running.
It prints out the name, as I told it to, but it doesn't seem to run the method i'm telling it to.
Thanks.


Sign In
Create Account


Back to top









