JavaRuntime Method

Applies to TestComplete 15.64, last modified on May 16, 2024


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



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.


The method has the following parameter:


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.


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


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

See Also

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

Highlight search results