Tuning the Java Virtual Machine

Java Documentation | Bitbucket

Help us help you: Take a short survey!

Here we describe how the user can configure Java Virtual Machine (VM) specific parameters, in the event that it’s necessary to increase memory allocation or tune the VM.

The Coherent Datafeed: Thomson Reuters Edition uses the rJava package to bridge R and Java.

In order to tune settings on the VM, add the following line before you load the library — note that the java.parameters can have many values, what is shown here is for demonstration purposes only.

options(java.parameters = c(“-Xmx2500m”))

Below we provide an example which contains several parameters.

options( java.parameters = c(“-Djava.awt.headless=true”, “-Xmx1g”) )

Here’s a full example and note that the options declaration must appear before the library is loaded:

    options(java.parameters = c("-Xmx2500m"))
    library("cdatafeedtre")
    Initialize()
    InstallLicense("C:/Temp/license.lic")
    Login(dacsId)
    rics <- c("LCOc1")
    Query(serviceName="dIDN_RDF", symbols=rics)
    nextUpdate <- GetNextUpdate(timeout="2500")