title: Find the jetty home directory from inside a java web application when running as a linux service
body: <p>I have a jetty 9 installed on CentOS in <code>/srv/jetty</code>, and I have a webapp deployed inside jetty. 
  When I start jetty with <code>java -jar start.jar &amp;</code> then inside the web application I can do this:  </p>
  
  <p><code>File base = new File(".");</code><br>
  <code>System.out.println("Base Dir: " + base.getAbsolutePath());</code></p>
  
  <p>And it returns me the correct directory of the jetty installation.</p>
  
  <p>But then I add jetty as a linux service, to run with a user called jetty, and start with <code>service jetty start</code> then calling the above code, will allways give me back the home directory of the user, who is running jetty in this case <code>/home/jetty/</code> or if I run as root then <code>/root/</code></p>
  
  <p>How can I set up jetty to find the correct directory? I tried with jetty.home in the config files, but nothing seems to work.</p>