title: Run java jar file on a server as background process
body: <p>I need to run a java jar in server in order to communicate between two applications. I have written two shell scripts to run it, but once I start up that script I can't shut down / terminate the process. If I press <kbd>ctrl</kbd>+<kbd>C</kbd> or close the console, the server will shut down. Could anyone help me how to modify this script to run as a normal server?</p>
  
  <pre><code> #!/bin/sh
  java -jar /web/server.jar
  echo $! 
  #&gt; startupApp.pid
  </code></pre>