Similar question related to Batch script has an answer. But I need same in shell script.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Just launch your jar adding a & at the end Example :
#!/bin/bash
java -jar myjar1.jar &
java -jar myjar2.jar &
java -jar myjar3.jar &
If you want the jar keep running after closing the terminal, use nohup :
#!/bin/bash
nohup java -jar myjar1.jar &
nohup java -jar myjar2.jar &
nohup java -jar myjar3.jar &
I use it in a project, works like a charm.