setJavaPath: Set the path to Java

View source: R/j4rConfig.R

setJavaPathR Documentation

Set the path to Java

Description

This is an option function that makes it possible to set the JAVA environment variable in R, if it is not already set. It first tests if the path ends with java or java.exe and if it is actually a file. Note that if an empty character is passed to this function, it resets the JAVA environment variable and J4R will then rely on the path to find java.exe.

Usage

setJavaPath(path)

Arguments

path

the complete path to Java as in the example below. The file.path function should be used to define the path

See Also

file.path

Examples

myPath <- file.path("C:","Program Files (x86)","Java", "jre1.8.0_221", "bin", "java.exe")
# setJavaPath(myPath)  ### not run


CWFC-CCFB/J4R documentation built on Oct. 30, 2024, 4:20 p.m.