java -jar包运行
cnetos7 - java环境下运行jar包:
java -jar AAAA.jar > AAAA.log &
或者
chmod +x AAAA.jar
./AAAA.jar > AAAA.log &
nohup java -jar xxx.jar &
nohup java -jar xxx.jar >/usr/local/temp.txt &
docker执行jar包
docker run -d -p 9090:9090 -v /usr/springboot-1.jar:/usr/springboot-1.jar --name springboot java:8u111 java -jar /usr/springboot-1.jar
脚本 restart-jar
#! /bin/sh
jps -l | grep test.jar | grep -v grep | awk '{print $1}' | xargs kill -9
java -jar test.jar > test.log &
docker run -it \
--name jar00 \
-v /data/jar:/opt \
-p 8099:8099 \
-d jdk8min:v0 \
java -jar /opt/entry.jar