linux running jar and vi

linux run the jar package

  • java -jar XXX.jar
    NOTE: ssh lock the current window, press CTRL + C to interrupt running programs, or close the window, the program exits
  • java -jar XXX.jar &
    Note: & representatives running in the background, do not lock the current window, the current window is closed, the program ends run
  • nohup java -jar XXX.jar &
    Note: nohup: do not hang up run named, the current account or withdraw terminal is closed, the program is still running
  • nohup java -jar> temp.txt &
    Note: command> out.file
    command> out.file is the command to redirect the output to out.file file, the text will not print output to the screen, but the output to out.file in

  • Mission command to view all running in the background
    jbos lists all programs running in the background and foreground numbered
    fg [number] will develop a number of programs transferred back to the foreground

  • View a port occupied by the thread PID netstat -nlp | grep '8080' # 8080 View port occupied by the thread pid
  • Kill thread kill -9 PID
  • View port is occupied netstat -an | grep '80' or ps
  • View java process running ps -ef | grep java

Guess you like

Origin www.cnblogs.com/monkay/p/11589758.html