Summary of jetty server startup methods [standby], jetty Server
1. Use the Java command to start
Java-jar start. jar
Ctrl + c close
Terminal window always exists
2. Use the Java command to start 2
Java-jar start. jar &
After the startup is successful, press enter to run it in the background.
To view the console information, enter the jetty and directory, and a nohup. out is generated.
Run tail-f nohup. out.
3. Use the Java command to start 3
Java-DSTOP. PORT = 8009-DSTOP. KEY = secret-jar start. jar start
Java-DSTOP. PORT = 8009-DSTOP. KEY = secret-jar start. jar -- stop close
You can stop the jetty service in another terminal window of the local machine.
In linux, You can first transfer the jetty process to the background for execution, and then stop the Jetty service through the command line.
4. Start in the background
./Bin/jetty. sh start
./Bin/jetty. sh stop close
Terminal window can be closed