0

我正在从 Java以批处理模式执行 KNIME 工作流。

输出似乎表明成功,但进程永远不会返回(我必须使用超时参数来杀死它)。

问题:有人知道为什么该过程永远不会返回吗?

Executing [C:\Program Files\KNIME\KNIME.exe, -noexit, -nosplash, -nosave, -reset, -application, org.knime.product.KNIME_BATCH_APPLICATION, -workflowFile="C:\...\workflow.knwf", -workflow.variable=template.sdf,C:\...\template.sdf,String, --launcher.suppressErrors]  [main] at AntBuildLogger.messageLogged()
KNIME.exe stdout: CompilerOracle: exclude javax/swing/text/GlyphView.getBreakSpot                            [Thread-2] at AntBuildLogger.messageLogged()
KNIME.exe stdout: INFO   main BatchExecutor  ===== Executing workflow C:\...\workflow.knwf =====  [Thread-2] at AntBuildLogger.messageLogged()
...
KNIME.exe stdout: INFO   main BatchExecutor  Workflow execution done Finished in 3 secs (3937ms)             [Thread-2] at AntBuildLogger.messageLogged()
KNIME.exe stdout: INFO   main BatchExecutor  ============= Workflow executed sucessfully ===============     [Thread-2] at AntBuildLogger.messageLogged()

我正在使用 Windows 10 和 KNIME 3.2.1。

我以编程方式使用 Ant Exec 任务,因此我非常有信心正确处理所有输入/输出/错误流(我也在使用该代码调用许多其他可执行文件)。

4

2 回答 2

2

它是由-noexit参数引起的(在手动启动时在 Windows 上很有用),因为它可以防止在完成执行后关闭进程。

于 2016-10-14T18:09:56.497 回答
0

Windows 要求-consoleLog -noexit保持 DOS 窗口打开以查看控制台输出。一旦你测试了 Knime 批处理运行,你可以删除-consoleLog -noexit参数,这样它就不会在等待用户退出进程时挂起。

要查看其他选项,您可以在 DOS 窗口中运行以下命令。 knime.exe -consoleLog -noexit -nosplash -application org.knime.product.KNIME_BATCH_APPLICATION

于 2019-03-20T15:37:26.313 回答