JavaInit: Initialize or terminate the Java Virtual Machine

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

.JavaInit loads and starts the Java Virtual Machine and the Omegahat session which brokers requests to Java classes and objects. The arguments to this function control the initial configuration and environment of the JVM.

Usage

1
2
.JavaInit(..., config=NULL, default=javaConfig(), verbose=FALSE,
          callbackHandler=javaHandlerGenerator())

Arguments

config

an object containing elements to be used in the classpath of the new JVM, system properties, and libraryPath elements for loading code via JNI (from Java). See javaConfig

default

the default configuration options (classpath, properties, etc.) that are merged with those from the config argument.

verbose

logical value indicating whether diagnostic information should be displayed on the screen as the JVM and Omegahat session are initialized. This is for use in debugging failures or anomalies in the startup.

callbackHandler

an object (usually a closure) that handles requests from the Java/Omegahat system for method invocations on R objects exported to that foreign system. This is usually javaHandlerGenerator

...

additional arguments passed to JavaConfiguration to influence settings.

Details

Creates and starts the JVM and Omegahat session. Also, registers a function or list of functions (closure) to handle callbacks from Java to R objects and functions.

Value

A logical value indicating whether the initialization was successful.

Author(s)

Duncan Temple Lang, John Chambers

References

http://www.omegahat.org/RSJava

See Also

javaConfig

Examples

1
2
3
4
## Not run: 
 .JavaInit()

## End(Not run)

SJava documentation built on Oct. 5, 2016, 4:17 a.m.

Related to JavaInit in SJava...