title: Using the rJava package on Win7 64 bit with R
body: <p>I'm trying to install <code>rJava</code> on a computer with Win 7 64 bit. When I run</p>
  
  <pre><code>install.packages("rJava")
  </code></pre>
  
  <p>everything seems to be fine:</p>
  
  <pre><code>Installing package(s) into ‘C:/Users/djq/Documents/R/win-library/2.13’
  (as ‘lib’ is unspecified)
  trying URL 'http://software.rc.fas.harvard.edu/mirrors/R/bin/windows/contrib/2.13/rJava_0.9-1.zip'
  Content type 'application/zip' length 654936 bytes (639 Kb)
  opened URL
  downloaded 639 Kb
  
  package 'rJava' successfully unpacked and MD5 sums checked
  
  The downloaded packages are in
      C:\TEMP\RtmpW2eAUw\downloaded_packages
  </code></pre>
  
  <p>but when I tried to load the library <code>library(rJava)</code> I get the following error:</p>
  
  <pre><code>Error : .onLoad failed in loadNamespace() for 'rJava', details:
    call: inDL(x, as.logical(local), as.logical(now), ...)
    error: unable to load shared object 'C:/Users/me/Documents/R/win-library/2.13/rJava/libs/x64/rJava.dll':
    LoadLibrary failure:  %1 is not a valid Win32 application.
  
  Error: package/namespace load failed for 'rJava'
  </code></pre>
  
  <p>I have installed  the Java JRE (trying both 32 and 64 bit versions) and the JDK (using both 32 and 64 bit). My R version is <code>R version 2.13.1 (2011-07-08)</code> and I'm using RStudio. </p>
  
  <p>If I try using 32 bit R, I can load <code>rJava</code> fine. Is the problem just that <code>rJava</code> does not run in R 64 bit? How can I tell if a package is just for 32 instead of 64?</p>
  
  <hr>
  
  <p>edit: just posted <code>R.version()</code>:</p>
  
  <pre><code>&gt; R.Version()
  $platform
  [1] "x86_64-pc-mingw32"
  
  $arch
  [1] "x86_64"
  
  $os
  [1] "mingw32"
  
  $system
  [1] "x86_64, mingw32"
  
  $status
  [1] ""
  
  $major
  [1] "2"
  
  $minor
  [1] "13.1"
  
  $year
  [1] "2011"
  
  $month
  [1] "07"
  
  $day
  [1] "08"
  
  $`svn rev`
  [1] "56322"
  
  $language
  [1] "R"
  
  $version.string
  [1] "R version 2.13.1 (2011-07-08)"
  </code></pre>