Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.0-beta-6
-
None
-
None
Description
should have detect the main method first before running it. otherwise any missing method error (not just missing main() method) will confuse the program.
Something like:
Method meth = null;
try {
meth = scriptClass.getDeclaredMethod("main", new Class[]
);
} catch (NoSuchMethodException e) {
try {
meth = scriptClass.getDeclaredMethod("main", new Class[]
);
} catch (NoSuchMethodException e1) {
try {
meth = scriptClass.getDeclaredMethod("main", new Class[]
);
} catch (NoSuchMethodException e2) {
}
}
}
if(meth != null) {
InvokerHelper.invokeMethod(scriptClass, "main", new Object[]
);
}
else {
//