I have ready spring web application for instance. But when I upload it to the VPS server via ftp, I can launch an application by connecting to the server via ssh. But there is a problem after exiting ssh, the application exits as well.

While googling I found some kind of solution connecting to the VPS server via screen in this case the application will resume even if the ssh connection is lost.

But I am very curious about if it is good solution. Could anyone launch enterprise application in such mode?

1 Answers

jin On

it is about shell. if you run java -jar yourApplication.jar, the process is subprocess of shell. the shell quit, your application quit. use the command nohup java -jar yourApplicaion >>/dev/null 2>&1 &. for enterprise, they often use jenkins, Kubernetes.