title: No log files produced when java program is run through systemd unit in Ubuntu
body: <p>OS -> Ubuntu 16.04 x64</p>
  
  <p>When the following java program is run as <code>&lt;user&gt;</code> from command line it produces the log files in the directory inside <code>&lt;/home/user&gt;</code> as configured in the java util logging properties file passed in as system parameter.</p>
  
  <pre><code>nohup java -Duser.home=&lt;home/&lt;user&gt;&gt; -Djava.util.logging.config.file=/home/&lt;user&gt;/&lt;path_to_logging.properties&gt; -cp &lt;jarname&gt;.jar &lt;MainClass&gt; &gt;&gt; /dev/null 2&gt;&gt;/dev/null &amp;
  </code></pre>
  
  <p>However, when the same program is run as the following systemd unit, the program runs okay (can see the the output when it is piped to a file instead of /dev/null) but the log files are not produced!! </p>
  
  <pre><code>[Unit]
  Description=Daemon Desc
  
  [Service]
  WorkingDirectory=/home/&lt;user&gt;/&lt;app&gt;
  ExecStart=/usr/share/java -Duser.home=/home/&lt;user&gt; -Djava.util.logging.config.file=/home/&lt;user&gt;/&lt;path_to_logging.properties&gt; -cp &lt;jarname&gt;.jar &lt;MainClass&gt;
  
  User=&lt;user&gt;
  
  [Install]
  WantedBy=multi-user.target
  </code></pre>
  
  <p>Any help will be much appreciated.</p>