connectToJava: Connect to Java environment

Description Usage Arguments Details Value See Also

View source: R/j4rConnection.R

Description

This function connects the R environment to a gateway server that runs in Java.

Usage

1
2
3
4
5
6
connectToJava(
  port = c(0, 0),
  extensionPath = NULL,
  memorySize = NULL,
  debug = FALSE
)

Arguments

port

a vector of the listening ports for the Java server

extensionPath

the path to jar files that can be loaded by the system classloader

memorySize

the memory size of the Java Virtual Machine in Mb (if not specified, the JVM runs with the default memory size)

debug

for debugging only (should be left as is)

Details

The first argument of the function provides the listening port for the Java server. A maximum of four ports is allowed. When set to 0, these ports are randomly selected. By default, the server listens to two random ports.

The extensionPath can either be set in this function or dynamically changed (see the addToClassPath function).

Value

a logical TRUE if the function managed to get connected to the server or if it was already connected or FALSE if the connection has failed

See Also

addToClassPath


J4R documentation built on July 23, 2020, 9:06 a.m.