java_env_set {rJavaEnv} | R Documentation |
JAVA_HOME
and PATH
environment variables to a given pathSet the JAVA_HOME
and PATH
environment variables to a given path
java_env_set(
where = c("session", "both", "project"),
java_home,
project_path = NULL,
quiet = FALSE
)
where |
Where to set the |
java_home |
The path to the desired |
project_path |
A |
quiet |
A |
Nothing. Sets the JAVA_HOME and PATH environment variables.
## Not run:
# download, install Java 17
java_17_distrib <- java_download(version = "17", temp_dir = TRUE)
java_home <- java_install(
java_distrib_path = java_17_distrib,
project_path = tempdir(),
autoset_java_env = FALSE
)
# now manually set the JAVA_HOME and PATH environment variables in current session
java_env_set(
where = "session",
java_home = java_home
)
# or set JAVA_HOME and PATH in the spefific projects' .Rprofile
java_env_set(
where = "session",
java_home = java_home,
project_path = tempdir()
)
## End(Not run)