#!/bin/bash
指定JDK路径
JDK_PATH=/path/to/jdk
打包好的JAR文件名
JAR_FILE=application.jar
在新的screen会话中运行JAR
screen -dmS myapp $JDK_PATH/bin/java -jar $JAR_FILE
#!/bin/bash
JDK_PATH=/path/to/jdk
JAR_FILE=application.jar
screen -dmS myapp $JDK_PATH/bin/java -jar $JAR_FILE