Page tree
Skip to end of metadata
Go to start of metadata

This object allows you to load Java applications using the Java Runtime Environment (JRE) on the player. The JRE utilizes OpenJDK 7 and is available on XTx43, XDx33, HDx23, LS423, and 4Kx42 models.

Object Creation

The roJRE object is instantiated with the Java package filename and an optional associative array that specifies JVM system properties and program arguments. You can use the Type() global function to determine if the package was successfully loaded.

CreateObject("roJRE", filename As String, options As roAssociativeArray)

The associative array can contain two entries:

  • defines: An associative array specifying system properties.
  • arguments : An array specifying command-line arguments.

All property/argument values must be passed as strings. Note that associative-array keys are case insensitive (i.e. converted to all lowercase) by default; use the roAssociativeArray.SetModeCaseSensitive() method to enable case-sensitive keys.

props = {}
props["SYS_PROP_1"] = "system prop 1"
props["SYS_PROP_2"] = "system prop 2"
props[""] = "/var/tmp"
jre = CreateObject("roJRE", "app.jar", { defines: props, arguments: [ "arg 1", "arg 2" ] })
if type(jre)="roJRE" then
	print "Successfully started Java runtime"
	print "Unable to start Java runtime"
end if
  • No labels