title: Find out what JRE is used to run app in Windows with multiple JREs installed
body: <p>I have multiple JREs installed (6,7,8 both 32 and 64 bit). The way I have set things up is that I have the set up a number of <code>JAVA_x_HOME</code> paths and then reference <code>JAVA_HOME=%JAVA_x_HOME%</code> depending on wich version I want to use. However im not sure every application uses <code>JAVA_HOME</code> when deciding wich JRE to execute on. </p>
  
  <p>Therfore my questions are:</p>
  
  <p>Is there is a way to check wich JRE is used for running some started Java program under Windows 7?</p>
  
  <p>What are the way an application can detect wich JRE to execute on?</p>