title: Cannot load rJava because cannot load a shared library
body: <p>I have been struggling to load the rJava package in R. </p>
  
  <p>I get the following messages</p>
  
  <pre><code>&gt; library(rJava)
  Error in inDL(x, as.logical(local), as.logical(now), ...) : 
    unable to load shared library \
       'C:/PROGRA~1/R/R-210~1.1/library/rJava/libs/rJava.dll':
    LoadLibrary failure:  The specified module could not be found.
  
  
  Error : .onLoad failed in 'loadNamespace' for 'rJava'
  Error: package/namespace load failed for 'rJava'
  </code></pre>
  
  <p>I have tried so many solutions that they are all bamboozeled in my head. 
  At some point I even got </p>
  
  <pre><code>&gt; R Console: Rgui.exe - System Error The
  &gt; program can't start because
  &gt; MSVCR71.dll is is missing from your
  &gt; computer. Try reinstalling the program
  &gt; to fix this problem.
  </code></pre>
  
  <p>I made sure everything I could think of was on the path</p>
  
  <pre><code>&gt; C:\Program Files\R\Rtools\bin;C:\Program Files\R\Rtools\perl\bin;
    C:\Program Files\R\Rtools\MinGW\bin;%SystemRoot%\system32;
    %SystemRoot%;%SystemRoot%\System32\Wbem;
    %SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;
    C:\Program Files\QuickTime\QTSystem\;
    C:\Program Files\R\R-2.10.1\library\rJava\libs\;
    C:\Program Files\R;C:\Program Files\Java\jre6\bin\client  
  </code></pre>
  
  <p>What should I try next?</p>
  
  <p>I am running R version 2.10.1 (2009-12-14) and I have also tried R version 2.10.1 Patched (2010-03-03 r51210). It is on a Windows machine running windows 7 enterprise</p>