【问题标题】:How to run jar using shell script and wait for its completion and then perform other task [closed]如何使用shell脚本运行jar并等待其完成然后执行其他任务[关闭]
【发布时间】:2020-02-27 18:35:58
【问题描述】:

我必须先执行 jar 文件的 shell 脚本,然后在执行后执行文件处理,因为该 jar 将产生一些输出文件。

【问题讨论】:

  • 你忘了问一个问题并描述你到目前为止所做的尝试。

标签: java shell unix


【解决方案1】:

你可以给出执行jar的命令,然后是处理命令。在 shell 中,命令按顺序执行。

例如:

java -jar directory/jarname >> output.txt
//followed by other commands

你可以参考这个[https://unix.stackexchange.com/questions/159513/what-are-the-shells-control-and-redirection-operators][1]

【讨论】:

    猜你喜欢
    • 2015-11-14
    • 1970-01-01
    • 2018-11-28
    • 2016-05-23
    • 2015-04-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-02-16
    相关资源
    最近更新 更多