title: Checking/getting JAVA_HOME Variable from Java
body: <p>Inside a Java program, how can I read the <code>JAVA_HOME</code> variable (to be sure it is set the correct way)? 
  Similarly, how can I get  the path of the <code>bin</code> folder? That is, the path usually set in Windows via:</p>
  
  <p><code>path %path%;%JAVA_HOME%\bin</code></p>
  
  <p>Note: I am using the OpenJDK build by <a href="https://github.com/alexkasko" rel="noreferrer">Alexkasko</a>.</p>