title: How can I detect the installed Sun/Oracle JRE on Windows?
body: <p>I tried googling the answer, but all I found was tips on how to detect Java from a browser or the very generic way of just starting Java and see if it runs, which introduces a possibly long delay in my application. (~ two seconds when started the very first time on my machine)</p>
  
  <p>I hope there is a faster way, if the following restrictions apply:</p>
  
  <ul>
  <li>Only Sun/Oracle JREs or JDKs </li>
  <li>Only 1.6 and higher</li>
  <li>Only Windows platforms</li>
  <li><strong>Not</strong> from a browser, but from a plain old Win32 executable</li>
  </ul>
  
  <p>This detection is not meant for a public application, but for internal use on Windows platforms only.</p>
  
  <p>Is there a registry path I can read or some configuration file I can parse?</p>