I am trying to load the RJava on RStudio and I am getting this error message.
> library(rJava) Error: package or namespace load failed for ‘rJava’: .onLoad failed in loadNamespace() for 'rJava', details: call: dyn.load(file, DLLpath = DLLpath, ...) error: unable to load shared object '/Library/Frameworks/R.framework/Versions/3.6/Resources/library/rJava/libs/rJava.so': dlopen(/Library/Frameworks/R.framework/Versions/3.6/Resources/library/rJava/libs/rJava.so, 6): Library not loaded: /Library/Java/JavaVirtualMachines/jdk-11.0.1.jdk/Contents/Home/lib/server/libjvm.dylib Referenced from: /Library/Frameworks/R.framework/Versions/3.6/Resources/library/rJava/libs/rJava.so Reason: image not found
However, it works when I load on Terminal.
If someone can help me to solve this I would appreciate.
I am using a macOS Catalina Version 10.15.2
R version 3.6.1
Platform: x86_64-apple-darwin15.6.0 (64-bit)
RStudio Version 1.2.5001