if (FALSE) {
# 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()
)
}
Run the code above in your browser using DataLab