0

I'm still a newbie when it comes to programming in general, and I came across this error message when installing the package "xlsx". I looked at the error up close and can verify that the path is valid, but for some reason the object is not loading.

I'm terrible at solving programming issues, but I need this for work.

I'm running R Studio version 1.2.5033 and the base R version 3.6.2 and my PC runs on Windows 10 Home edition. I have installed the most recent Java version, developer toolkit included.

** package 'xlsx' successfully unpacked and MD5 sums checked
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
  converting help for package 'xlsx'
    finding HTML links ... done
    Alignment                               html  
    Border                                  html  
    Cell                                    html  
    CellBlock                               html  
    CellProtection                          html  
    CellStyle-plus                          html  
    CellStyle                               html  
    Comment                                 html  
    DataFormat                              html  
    Fill                                    html  
    Font                                    html  
    NamedRanges                             html  
    OtherEffects                            html  
    POI_constants                           html  
    Picture                                 html  
    PrintSetup                              html  
    Row                                     html  
    Sheet                                   html  
    Workbook                                html  
    addDataFrame                            html  
    addHyperlink                            html  
    autoRefresh                             html  
    read.xlsx                               html  
    readColumns                             html  
    readRows                                html  
    write.xlsx                              html  
Rd warning: C:/Users/User/AppData/Local/Temp/Rtmp4E9nLC/R.INSTALL3398396f6f02/xlsx/man/write.xlsx.Rd:61: file link 'write.csv' in package 'utils' does not exist and so has been treated as a topic
    xlsx-package                            html  
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
*** arch - i386
Error: package or namespace load failed for 'xlsx':
 .onLoad failed in loadNamespace() for 'rJava', details:
  call: inDL(x, as.logical(local), as.logical(now), ...)
  error: unable to load shared object 'C:/Users/User/Documents/R/win-library/3.6/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:/Users/User/Documents/R/win-library/3.6/xlsx'
Warning in install.packages :
  installation of package ‘xlsx’ had non-zero exit status
Roma JC
  • 57
  • 5
  • Does this answer your question? [R - Error : .onLoad failed in loadNamespace() for 'rJava'](https://stackoverflow.com/questions/37735108/r-error-onload-failed-in-loadnamespace-for-rjava) – Thomas L. Feb 13 '20 at 12:06
  • Your system is 32 bit or 64 bit? – UseR10085 Feb 13 '20 at 12:08
  • 1
    I suggest installing `readxl` instead as it doesn't have a dependency on Java. – Edward Feb 13 '20 at 12:49
  • 1
    thank you everyone! Turns out the code for the java path was not well written. Thank you so much for all your help!! here is what helped me for future reference: https://stackoverflow.com/a/37740631/12890863 – Roma JC Feb 13 '20 at 12:53

0 Answers0