新建run.sh 添加如下内容 #!/bin/sh nohup java -jar /home/jars/jar包名称 >> /home/jars/日志名字date +%Y-%m-%d.out 2>&1 & ./run.sh执行脚本