2

My system is Mac OS 10.11.5 and has R 3.3.1 and java 1.8.0_92 installed. I have installed XLConnect and XLConnectJars. When I am trying load XLConnect, I get the following error message:

library(XLConnect)
Loading required package: XLConnectJars
JavaVM: requested Java version ((null)) not available. Using Java at "" instead.
JavaVM: Failed to load JVM: /bundle/Libraries/libserver.dylib
JavaVM FATAL: Failed to load the jvm library.
Error : .onLoad failed in loadNamespace() for 'XLConnectJars', details:
  call: .jinit()
  error: JNI_GetCreatedJavaVMs returned -1

Error: package ‘XLConnectJars’ could not be loaded

I already tried specifying the directory of the java version options(java.home="/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk") as explained in Does XLConnect package work with Java 8?, but this did not solve the problem.

Community
  • 1
  • 1
scs
  • 567
  • 6
  • 22
  • Possible duplicate of [Does XLConnect package work with Java 8?](http://stackoverflow.com/questions/26549829/does-xlconnect-package-work-with-java-8) – seairth Jun 28 '16 at 14:53
  • Thanks for your hint to the link, but it did not solve the problem. I modified my question to provide a more detailed explanation – scs Jun 28 '16 at 15:00
  • @scs I was getting this error recently and I solved it by downloading and installing [`java for osx`](http://supportdownload.apple.com/download.info.apple.com/Apple_Support_Area/Apple_Software_Updates/Mac_OS_X/downloads/031-29055.20150831-0f779fb2-4bf4-11e5-a8d8-/javaforosx.dmg). I am not quite sure how or why it worked for me, but it did. – Abdou Jun 29 '16 at 10:48

0 Answers0