package 'rJava' could not be loaded
<p>I cannot solve my problem with rjava on R.</p>

<p>When I install rJava package and require it, I have no issues .</p>

<pre><code>install.packages("devtools")
install.packages("rJava")
library(rJava)
Sys.setenv(JAVA_HOME="C:/Program Files (x86)/Java/jre1.8.0_77")

devtools::install_github("kassambara/r2excel",INSTALL_opts="--no-multiarch")
</code></pre>

<p>When I compile the last line, I have this issue:</p>

<pre><code>* installing *source* package 'r2excel' ...
** R
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
*** arch - i386
*** arch - x64
Error : .onLoad failed in loadNamespace() for 'rJava', details:
  call: inDL(x, as.logical(local), as.logical(now), ...)
  error: impossible de charger l'objet partagé 'C:/Users/itm/Documents/R/win-library/3.2/rJava/libs/x64/rJava.dll':
  LoadLibrary failure:  %1 n’est pas une application Win32 valide.

Error : package 'rJava' could not be loaded
Erreur : le chargement a échoué
Exécution arrêtée
ERROR: loading failed for 'x64'
* removing 'C:/Users/itm/Documents/R/win-library/3.2/r2excel'
</code></pre>

<p>And  I try using 32 bit R. but no change ! </p>

<p>An other package called 'xlsx' needs rJava to run and I can use it.. I don't understand why..</p>

<pre><code>  R.version
               _                           
platform       i386-w64-mingw32            
arch           i386                        
os             mingw32                     
system         i386, mingw32               
status                                     
major          3                           
minor          2.3                         
year           2015                        
month          12                          
day            10                          
svn rev        69752                       
language       R                           
version.string R version 3.2.3 (2015-12-10)
nickname       Wooden Christmas-Tree 
</code></pre>

<p>Thanks for you help</p>