SJava (version 0.98.0)

.JavaInit: Initialize or terminate the Java Virtual Machine

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

.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.

Value

A logical value indicating whether the initialization was successful.

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.

References

http://www.omegahat.org/RSJava

See Also

javaConfig

Examples

Run this code
## Not run: 
#  .JavaInit()
# ## End(Not run)

Run the code above in your browser using DataLab