0

I have a problem with my R code (shiny application). It gives me the following error when I'm trying to load the "rJava" package:

error: unable to load shared object 'C:/Documents/R/win-library/3.4/rJava/libs/x64/rJava.dll':
LoadLibrary failure:  The specified module could not be found.
Error : package ‘rJava’ could not be loaded

I use Windows 10 64-bit.

Does anyone know how can I fix this error?

Thanks in advance.

Best,

Annick

Annick
  • 1
  • Did you try that: https://stackoverflow.com/a/27667945/1100107 ? – Stéphane Laurent Aug 09 '17 at 10:42
  • Yes I tried already but it did not work...I am really despaired. Do you know something else? – Annick Aug 10 '17 at 07:42
  • No sorry. If you speak French you can take a look or ask a question at http://forums.cirad.fr/logiciel-R/ Are you sure your environment variable `JAVA_HOME` is set to a 64 bit version of Java ? (if you use R 64 bit). – Stéphane Laurent Aug 10 '17 at 09:05
  • No I am not sure. How can I check this? And if it is not the case, how can I set the variable `JAVA_HOME` to 64 bit version of Java? – Annick Aug 10 '17 at 09:31
  • If this is a 32bit version of Java then `library(rJava)` should work if you use R 32bit. I don't know how to check, personally I use the laptop of my job and I've downloaded two portable versions of Java, one 32 bit and the other one 64 bit. – Stéphane Laurent Aug 10 '17 at 09:36
  • Ok it works now! Thank you very much @StéphaneLaurent – Annick Aug 10 '17 at 11:57

0 Answers0