title: Require to get linux environment parameter values in java
body: <p>I am using tomcat on Linux for my web portal. I need to use the home path of the environment. But when I try to get the home path it gives me the home path of tomcat user. I need home path for a different user.
  I am using the below code to get the environment values and get the value of HOME from it</p>
  
  <pre class="lang-java prettyprint-override"><code>Map&lt;String, String&gt; env = System.getenv();
  homePath=env.get("HOME").toString();
  </code></pre>
  
  <p>It is giving me the output as below</p>
  
  <blockquote>
    <p>HOME=/home/tomcat</p>
  </blockquote>
  
  <p>Where as I require as below</p>
  
  <blockquote>
    <p>[ant00devc_i02]/data/a00dc $ echo $HOME<br>
    /data/a00dc<br>
    [ant12devc_i02]/data/a00dc $</p>
  </blockquote>
  
  <p>Where <code>a00dc</code> is a different Linux user.</p>