This topic is about running rules/scripts from within other rules, so won’t help you.
Having said that, this link should point you in the right direction ExecuteCommandLine and the following code is working in my implementation to run a command line executable -
'use strict';
var log = (context.logger === undefined) ? Java.type("org.slf4j.LoggerFactory").getLogger("org.openhab.core.model.script.actions") : context.logger
var Exec = (context.Exec === undefined) ? Java.type('org.openhab.core.model.script.actions.Exec') : context.Exec
var Transformation = (context.Transformation === undefined) ? Java.type('org.openhab.core.transform.actions.Transformation') : context.Transformation
var Duration = (context.Duration === undefined) ? Java.type("java.time.Duration") : context.Duration;
var SpeedtestOutput = Exec.executeCommandLine(Duration.ofSeconds(120),"/usr/bin/speedtest","-f","json");
Most of this was gained by getting help from @rlkoshak Thanks again Rich.
Trev