title: Run a Java Application as a Service on Linux
body: <p>I have written a Java server application that runs on a standard virtual hosted Linux solution.  The application runs all the time listening for socket connections and creating new handlers for them.  It is a server side implementation to a client-server application.</p>
  
  <p>The way I start it is by including it in the start up <em>rc.local</em> script of the server.  However once started I do not know how to access it to stop it and if I want to install an update, so I have to restart the server in order to restart the application.</p>
  
  <p>On a windows PC, for this type of application I might create a windows service and then I can stop and start it as I want.  Is there anything like that on a Linux box so that if I start this application I can stop it and restart it without doing a complete restart of the server.</p>
  
  <p>My application is called WebServer.exe.  It is started on server startup by including it in my <em>rc.local</em> as such:</p>
  
  <pre><code>java -jar /var/www/vhosts/myweb.com/phpserv/WebServer.jar &amp;
  </code></pre>
  
  <p>I am a bit of a noob at Linux so any example would be appreciated with any posts.   However I do have SSH, and full FTP access to the box to install any updates as well as access to a Plesk panel.</p>