Automatically run the following after installing a new version R:
R CMD javareconf -e
Otherwise, users get the following error when trying to install rJava:
checking Java support in R... present:
interpreter : '/usr/bin/java'
archiver : '/usr/bin/jar'
compiler : '/usr/bin/javac'
header prep.: ''
cpp flags : '-I/usr/java/jdk1.7.0_72/jre/../include -I/usr/java/jdk1.7.0_72/jre/../include/linux'
java libs : '-L/usr/java/jdk1.7.0_72/jre/lib/amd64/server -ljvm'
configure: error: One or more Java configuration variables are not set.
Make sure R is configured with full Java support (including JDK). Run
R CMD javareconf
as root to add Java support to R.
If you don't have root privileges, run
R CMD javareconf -e
to set all Java-related variables and then install rJava.
ERROR: configuration failed for package 'rJava'
* removing '/cbc/henrik/R/x86_64-pc-linux-gnu-library/3.3/rJava'
* restoring previous '/cbc/henrik/R/x86_64-pc-linux-gnu-library/3.3/rJava'
Automatically run the following after installing a new version R:
Otherwise, users get the following error when trying to install rJava: