title: Unable to load rJava.dll - not a valid Win32 application - while installing ReporteRsjars
body: <p>I am having problems installing ReporteRsjars package on my 64 bit R, 64 bit Windows 10 machine. The ReporteRsjars package was downloaded from the CRAN archive (tar.gz file) and installed from a local folder.</p>
  
  <p>R is saying that it can't load rJava.dll and seems to be looking for a 32 bit rJava.dll file (error message: not a valid Win32 application). I have no idea why it's doing this.</p>
  
  <p>I have installed the rJava package and calling library(rJava) seems to load the rJava package without any problems.</p>
  
  <p>I've also installed openJDK version 11 (64 bit), a zip file downloaded from <a href="http://jdk.java.net/11/" rel="nofollow noreferrer">http://jdk.java.net/11/</a>. There was no Windows installer, so I just unzipped it into C:\Program Files\Java and added a few system environment variables:
  C:\Program Files\Java\jdk-11\bin and 
  C:\Program Files\Java\jdk-11\bin\server</p>
  
  <p>And created a system environment variable:
  JAVA_HOME = C:\Program Files\Java\jdk-11</p>
  
  <p>Typing java -version on the Windows command prompt confirms my machine has openJDK 11, OpenJDK Runtime Environment 18.9. and OpenJDK 64 bit server 18.9. </p>
  
  <p>I don't know where I've gone wrong - would be grateful for any tips to get ReporteRsjars installed properly.</p>
  
  <pre><code> install.packages("C:/Users/h/Downloads/ReporteRsjars_0.0.4.tar.gz", repos = NULL, type = "source")
  '\\u\h\Documents'
  CMD.EXE was started with the above path as the current directory.
  UNC paths are not supported.  Defaulting to Windows directory.
  * installing *source* package 'ReporteRsjars' ...
  ** package 'ReporteRsjars' successfully unpacked and MD5 sums checked
  ** R
  ** inst
  ** byte-compile and prepare package for lazy loading
  ** help
  No man pages found in package  'ReporteRsjars' 
  *** installing help indices
  ** building package indices
  ** testing if installed package can be loaded
  *** arch - i386
  Error: package or namespace load failed for 'ReporteRsjars':
   .onLoad failed in loadNamespace() for 'rJava', details:
    call: inDL(x, as.logical(local), as.logical(now), ...)
    error: unable to load shared object 'C:/Program Files/R/R-3.5.1/library/rJava/libs/i386/rJava.dll':
    LoadLibrary failure:  %1 is not a valid Win32 application.
  
  Error: loading failed
  Execution halted
  *** arch - x64
  ERROR: loading failed for 'i386'
  * removing 'C:/Program Files/R/R-3.5.1/library/ReporteRsjars'
  * restoring previous 'C:/Program Files/R/R-3.5.1/library/ReporteRsjars'
  In R CMD INSTALL
  Warning in install.packages :
    installation of package ‘C:/Users/h/Downloads/ReporteRsjars_0.0.4.tar.gz’ had non-zero exit status
  </code></pre>