linux启动jar包sh文件

pid=`ps -ef|grep ‘yourprojectname' |grep -v 'grep'| awk '{print $2}'`
kill -9 $pid
echo "killing..."
nohup java -jar yourprojectname.jar &
tail -f nohup.out

posted @ 2022-04-25 10:34  HalleyZ  阅读(135)  评论(0编辑  收藏  举报