public static void startExportProcess(
      File idaExe, File outputDirectory, File fileToExport, String targetName)
      throws BinExportException {
    try {
      BinDiffProtos.Config.Builder config = Config.getInstance();
      LogOptions logOptions = config.getLog();
      IdaProOptions ida = config.getIda();
      String idaFullPath = Path.of(ida.getDirectory(), idaExe.getName()).toString();
      logger.atFinest().log("Launching %s, exporting %s", idaFullPath, fileToExport);
      IdaHelpers.createIdaProcess(
          idaFullPath,
          fileToExport.getAbsolutePath(),
          outputDirectory.getPath() + File.separator + targetName,
          logOptions.getToStderr(),
          logOptions.getToFile() ? Logger.getLoggingFilePath(logOptions.getDirectory()) : "",
          ida.getBinexportX86NoreturnHeuristic());
    } catch (IdaException e) {
      throw new BinExportException(e);
    }
  }
Static methods to help export IDA Pro databases to .BinExport.
java/ui/src/main/java/com/google/security/zynamics/bindiff/processes/ExportProcess.java