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))
}
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
Enregistrer un commentaire