title: Java cannot get environment variable (system property)
body: <p>I need that my code can get the environment variable when running test with IntelliJ:</p>
  
  <pre><code>private String sdkDir = System.getProperty("sdk.root");
  </code></pre>
  
  <p>The problem is that this is always <code>null</code>, I have set both in <code>bashrc</code> and also with <code>bash_profile</code> but not really works with Ubuntu. </p>
  
  <p><code>bashrc</code> and <code>bash_profile</code> both have this:</p>
  
  <pre><code>export JAVA_HOME=/home/xybrek/zulu1.8.0_25-8.4.0.1-x86lx64
  export JAVA_OPTIONS="-Dsdk.root=/home/xybrek/java-sdk-1.9.17"
  export PATH=$PATH:/home/xybrek/zulu1.8.0_25-8.4.0.1-x86lx64/bin
  export PATH
  </code></pre>
  
  <p>What could be missing with my configuration?</p>
  
  <p><strong>Update:</strong></p>
  
  <p>I cannot change the Java code: <code>System.getProperty("sdk.root");</code> as this is coming from a compiled Arquillian container I can't modify. </p>
  
  <p>What I need would be a proper way of having this <code>System.getProperty</code> method to get the value.</p>
  
  <p>Where to put this "sdk.root" for IntelliJ to pick it up? In a properties file or bash?</p>