set JAVA_HOME to correct value in .profile and .Rprofile if you have java jdk

If you have only java jdk installed: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

Note that if you have jdk (Java development kit) installed, the jre (java runtime environment) is also installed within the jdk. There is no need to install jre separately.

In your .profile:

export JAVA_HOME=$(/usr/libexec/java_home)/jre

Quit and open a new terminal session.

And in .Rprofile:

if (nchar(Sys.getenv("JAVA_HOME")) < 1) {
Sys.setenv(JAVA_HOME = system("echo $(/usr/libexec/java_home)/jre", intern=TRUE))
}

Do not forget to use in R:

sudo R CMD javareconf

Commentaires

Posts les plus consultés de ce blog

Standard error from Hessian Matrix... what can be done when problem occurs

stepAIC from package MASS with AICc

Install treemix in ubuntu 20.04