Nailgun: Allow the main class started from the nailgun server to be configured via an environment variable
When starting the Nailgun server via 'prism -ng', we now allow the main class to be served
to be configured via the NG_MAINCLASS environment variable. If not set, defaults to prism.PrismCL, as before.
This allows to use nailgun also with other test main methods, e.g., those in the LTL-to-automata classes.
System.err.println("PrismNG: Can not find class '"+ngMainClass+"' (from environment variable "+envNameNGMainClass+")");
System.exit(1);
}
String[]args=context.getArgs();
Methodm=null;
try{
m=clazz.getMethod("main",args.getClass());
}catch(NoSuchMethodExceptione){
System.err.println("PrismNG: Class '"+ngMainClass+"' (from environment variable "+envNameNGMainClass+") does not have a suitable main method");
System.exit(1);
}catch(SecurityExceptione){
System.err.println("PrismNG: Security exception trying to load main method of class '"+ngMainClass+"' (from environment variable "+envNameNGMainClass+"): "+e.getMessage());
System.err.println("PrismNG: Exception trying to invoke main method of class '"+ngMainClass+"' (from environment variable "+envNameNGMainClass+"): "+e.getMessage());