according to the Javascript documentation the time argument is optional but when I DONT code the command fails.
Exec.executeCommandLine(String... commandLine)
Exec.executeCommandLine(Duration timeout, String... commandLine)
var Exec = Java.type("org.openhab.core.model.script.actions.Exec");
var Duration = Java.type("java.time.Duration");
//var response = Exec.executeCommandLine("/opt/inverter_json.pl"); // fails
var response = Exec.executeCommandLine(Duration.ofSeconds(5),"/opt/inverter_json.pl"); //works!!
console.info("gotResult:" + response);