So that I can use libraries dependent on rJava. When I try loading rJava, I get this:
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.4/Resources/library/rJava/libs/rJava.so': dlopen(/Library/Frameworks/R.framework/Versions/3.4/Resources/library/rJava/libs/rJava.so, 6): Library not loaded: @rpath/libjvm.dylib Referenced from: /Library/Frameworks/R.framework/Versions/3.4/Resources/library/rJava/libs/rJava.so Reason: image not found
So then I run
sudo R CMD javareconf
With this version of Java:
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-468-11M4833)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-468, mixed mode)
Getting the following error:
trying to compile and link a JNI program
detected JNI cpp flags : -
I/System/Library/Frameworks/JavaVM.framework/Headers
detected JNI linker flags : -framework JavaVM
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -
I/System/Library/Frameworks/JavaVM.framework/Headers -
I/usr/local/include -fPIC -Wall -g -O2 -c conftest.c -o conftest.o
conftest.c:4:5: warning: 'JNI_CreateJavaVM' is deprecated
[-Wdeprecated-declarations]
JNI_CreateJavaVM(0, 0, 0);
^
/System/Library/Frameworks/JavaVM.framework/Headers/jni.h:1937:1: note:
'JNI_CreateJavaVM' has been explicitly marked deprecated here
JNI_CreateJavaVM(JavaVM **pvm, void **penv, void *args);