I'm using install.packages('rJava', type='source')
to install rJava, but it presents with the following error:
configure: error: one or more Java tools are missing.
*** JDK is incomplete! Please make sure you have a complete JDK. JRE is not sufficient. configure: error: ./configure failed for jri ERROR: configuration failed for package ‘rJava’ * removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/rJava’ * restoring previous ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/rJava’
Warning in install.packages : installation of package ‘rJava’ had non-zero exit status
I just installed JDK8 so I'm not sure what's going on.
javac -version
throws javac 1.8.0_231
java -version
throws java version "1.8.0_231"
Java(TM) SE Runtime Environment (build 1.8.0_231-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.231-b11, mixed mode)
This guy at R: rJava package install failing came up with a solution that I don't even understand since I'm new to this, but it has something to do with PATH
and JAVA_HOME
and /jre apparently.