can't load rJava in R 2.8.1 on Windows XP
Duncan Murdoch <murdoch <at> stats.uwo.ca> writes:
shell("set JAVA_HOME")
JAVA_HOME=C:\Program Files\Java\jre6
That doesn't last beyond the shell call, as far as I know. It starts a process to run the shell, sets the environment variable in that process, then the process dies and the setting dies with it. If you want a permanent setting, you should set it in the Rgui process, via Sys.setenv().
Trying again (after reading your private email): I tried to start
libary(rJava) after each of the following line, and the result
was always the same.
Dieter
shell("where jvm.dll")
#C:\Program Files\Java\jre6\bin\client\jvm.dll
Sys.getenv("JAVA_HOME")
# JAVA_HOME
#"C:/Program Files/Java/jre6/bin"
Sys.setenv(JAVA_HOME="C:/Program Files/Java/jre6")
Sys.setenv(JAVA_HOME="C:/Program Files/Java/jre6/bin")
Sys.setenv(JAVA_HOME="C:\\PROGRA~1\\Java\\jre6")
Sys.unsetenv("JAVA_HOME")