title: R looking for the wrong java version
body: <p>I installed/uninstalled java jre/jdk now many times and finally installed the older version 1.6.0_17 which is now located at &quot;C:\Program Files\Java\jre6\bin&quot;. Now after all if I call 'java -version' within R i can see that R is looking for Java at the old path which is now wrong. The question is: Why is R looking for Java at the wrong path even so the windows path is set correctly? There are no double entrys within the windows path as far as I can see and I restarted R as well as Windows more then once since then. Any Ideas where R takes the wrong path from?</p>
  <p>On windows shell:</p>
  <pre><code>&gt; set
  [..]
  OS=Windows_NT
  Path=C:\Program Files\Java\jre6\bin;
  [..]
  
  
  &gt; java -version
  java version &quot;1.6.0_17&quot;
  Java(TM) SE Runtime Environment (build 1.6.0_17-b04)
  Java HotSpot(TM) 64-Bit Server VM (build 14.3-b01, mixed mode)
  </code></pre>
  <p>within R:</p>
  <pre><code>&gt; system(&quot;java -version&quot;)
  Error: could not open `C:\Program Files (x86)\Java\jre6\lib\i386\jvm.cfg'
  </code></pre>