JavaRuntime Method

Applies to TestComplete 15.63, last modified on April 23, 2024

Description

This method returns a JavaRuntime object that provides access to a Java virtual machine loaded to the process that corresponds to the Java application. You can use this object to retrieve information about a Java virtual machine loaded to the process and to get access to static non-visual objects that exist in that virtual machine (you can get access to them through the JavaClasses property).

Declaration

TestObj.JavaRuntime(Index)

TestObj A variable, parameter or expression that specifies a reference to one of the objects listed in the Applies To section
Index [in]    Optional    Integer Default value: 0   
Result A JavaRuntime object

Applies To

The method is applied to the following objects:

View Mode

To view this method in the Object Browser panel and in other panels and dialogs, activate the Advanced view mode.

Parameters

The method has the following parameter:

Index

Specifies the zero-based index of the desired Java virtual machine among those loaded to the process. The default value is 0. To get the total number of Java virtual machines loaded to a process, use the JavaVMCount property.

Result Value

A JavaRuntime object that provides access to the specified Java virtual machine.

Remarks

The JavaRuntime method is available only if the Java Application Support plugin is installed.

Example

To view an example that demonstrates how to use the JavaRuntime method, see Addressing Objects in Java Applications.

See Also

JavaClasses
Addressing Objects in Java Applications
Testing Java Applications - Overview
Testing Java Applications

Highlight search results