fail to install package xlsx

hello

when i click to install xlsx inside my "RStudio version 2022.12.0+353 (2022.12.0+353)" with my "R 4.2.2 GUI 1.79 High Sierra build " in MacOS Catalina 10.15.7

i obtain this :

> library(xlsx)
Unable to find any JVMs matching version "(null)".
No Java runtime present, try --request to install.
Error: package or namespace load failed for ‘xlsx’:
 .onLoad failed in loadNamespace() for 'rJava', details:
  call: fun(libname, pkgname)
  error: JVM could not be found
In addition: Warning messages:
1: In system("/usr/libexec/java_home", intern = TRUE) :
  running command '/usr/libexec/java_home' had status 1
2: In fun(libname, pkgname) :
  Cannot find JVM library 'NA/lib/server/libjvm.dylib'
Install Java and/or check JAVA_HOME (if in doubt, do NOT set it, it will be detected)

what can i do ?

When I just installed, I got

install.packages("xlsx")
# also installing the dependencies ‘rJava’, ‘xlsxjars’

Is that what you saw?

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.