private int startAntTarget(String buildText, String javaHome) {
    final String antHome = getAntHome();
    if (antHome == null) {
      registerJavaFxPackagerError(JavaFXCommonBundle.message("bundled.ant.not.found"));
      return -1;
    }
    final ArrayList<String> commands = new ArrayList<>();
    commands.add(javaHome + File.separator + "bin" + File.separator + "java");

    commands.add("-Dant.home=" + antHome);

    commands.add("-classpath");
    commands.add(antHome + "/lib/ant.jar" + File.pathSeparator +
                 antHome + "/lib/ant-launcher.jar" + File.pathSeparator +
                 javaHome + "/lib/ant-javafx.jar" + File.pathSeparator +
                 javaHome + "/jre/lib/jfxrt.jar");
    commands.add("org.apache.tools.ant.launch.Launcher");
    String cmdLineParam = getMsgOutputLevel() != null ? getMsgOutputLevel().getCmdLineParam() : "";
    if (!cmdLineParam.isEmpty()) {
      commands.add(cmdLineParam);
    }
    commands.add("-f");
    try {
      File tempFile = FileUtil.createTempFile("build", ".xml");
      tempFile.deleteOnExit();
      FileUtil.writeToFile(tempFile, buildText.getBytes(Charset.defaultCharset()));
      commands.add(tempFile.getCanonicalPath());
    }
    catch (IOException e) {
      registerJavaFxPackagerError(e);
      return -1;
    }
    return startProcess(commands);
  }
private int startAntTarget(String buildText, String javaHome)