使用alwaysup软件,编写 java -jar xxx.jar,软件会脚本安装为服务。
java -jar xxx.jar
使用nohup java -jar yourapp.jar &命令。
nohup java -jar yourapp.jar &