I am executing zap by java code it is working fine on local but when i am trying to execute on jenkins giving the error ie, Unexpected end of file from server
public static void initZAPconnetion() {
String[] command = new String[6];
command[0] = "bash";
command[1] = "/home/ubuntu/ZAP_2.9.0/zap.sh";
command[2] = "-daemon";
command[3] = "-host 0.0.0.0";
command[4] = "-port 8090";
command[5] = "-config api.disablekey=true";
Runtime.getRuntime().exec(command);
getting error on the below line
zapScanner = new ZAProxyScanner(zapProxyHost, zapProxyPort,zapAPIKey);