Source:
protected boolean pack() { try { configurationGenerator.setProperty(PARAM_UPDATECENTER_DISABLED, "true"); List<String> startCommand = new ArrayList<>(); startCommand.add(getJavaExecutable().getPath()); startCommand.addAll(getJavaOptsProperty(opt -> StrSubstitutor.replace(opt, configurationGenerator.getUserConfig()))); startCommand.add("-cp"); String classpath = getClassPath(); classpath = addToClassPath(classpath, "bin" + File.separator + "nuxeo-launcher.jar"); classpath = getClassPath(classpath, configurationGenerator.getServerConfigurator().getServerLibDir()); classpath = getClassPath(classpath, configurationGenerator.getServerConfigurator().getNuxeoLibDir()); classpath = getClassPath(classpath, new File(configurationGenerator.getRuntimeHome(), "bundles")); startCommand.add(classpath); startCommand.addAll(getNuxeoProperties()); if (configurationGenerator.isTomcat) { startCommand.add(PACK_TOMCAT_CLASS); } else { errorValue = EXIT_CODE_ERROR; return false; } startCommand.add(configurationGenerator.getRuntimeHome().getPath()); for (String param : params) { startCommand.add(param); } ProcessBuilder pb = new ProcessBuilder(getOSCommand(startCommand)); pb.directory(configurationGenerator.getNuxeoHome()); log.debug("Pack command: " + pb.command()); Process process = pb.start(); ArrayList<ThreadedStreamGobbler> sgArray = logProcessStreams(process, true); Thread.sleep(100); process.waitFor(); waitForProcessStreams(sgArray); } catch (IOException | InterruptedException e) { errorValue = EXIT_CODE_ERROR; log.error("Could not start process", e); } catch (ConfigurationException e) { errorValue = EXIT_CODE_ERROR; log.error(e); } return errorValue == EXIT_CODE_OK; }

Target:
protected boolean pack() { try { configurationGenerator.setProperty(PARAM_UPDATECENTER_DISABLED, "true"); List<String> startCommand = new ArrayList<>(); startCommand.add(getJavaExecutable().getPath()); startCommand.addAll(getJavaOptsProperty(Function.identity())); startCommand.add("-cp"); String classpath = getClassPath(); classpath = addToClassPath(classpath, "bin" + File.separator + "nuxeo-launcher.jar"); classpath = getClassPath(classpath, configurationGenerator.getServerConfigurator().getServerLibDir()); classpath = getClassPath(classpath, configurationGenerator.getServerConfigurator().getNuxeoLibDir()); classpath = getClassPath(classpath, new File(configurationGenerator.getRuntimeHome(), "bundles")); startCommand.add(classpath); startCommand.addAll(getNuxeoProperties()); if (configurationGenerator.isTomcat) { startCommand.add(PACK_TOMCAT_CLASS); } else { errorValue = EXIT_CODE_ERROR; return false; } startCommand.add(configurationGenerator.getRuntimeHome().getPath()); for (String param : params) { startCommand.add(param); } ProcessBuilder pb = new ProcessBuilder(getOSCommand(startCommand)); pb.directory(configurationGenerator.getNuxeoHome()); log.debug("Pack command: " + pb.command()); Process process = pb.start(); ArrayList<ThreadedStreamGobbler> sgArray = logProcessStreams(process, true); Thread.sleep(100); process.waitFor(); waitForProcessStreams(sgArray); } catch (IOException | InterruptedException e) { errorValue = EXIT_CODE_ERROR; log.error("Could not start process", e); } catch (ConfigurationException e) { errorValue = EXIT_CODE_ERROR; log.error(e); } return errorValue == EXIT_CODE_OK; }