2

I got a problem when I called 'XLConnect' library in R.

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

This error happened after I installed XLConnect and wrote library(XLconnect).

I googled this problem but there are no proper solution in my case. I have already installed Java 8 and checked java location in terminal. I run R in mac OS X (10.10.5)

Thank you for your help.

Luis Kang
  • 251
  • 1
  • 4
  • 15
  • 1
    Are your JAVA and R architectures matching? I mean, do you run 32bit R and 32bit JAVA , or 64bit R and 64bit JAVA? If they don't match (eg 32bit JAVA and 64bit R), that's the kind of errors you might expect. – Joris Meys Jan 27 '16 at 12:56
  • I checked my Java and R, they are all 64-bit. – Luis Kang Jan 28 '16 at 10:40

1 Answers1

3

I solve the problem thanks to http://www.r-bloggers.com/getting-r-and-java-1-8-to-work-together-on-osx/

Luis Kang
  • 251
  • 1
  • 4
  • 15