Selecting Target Java Virtual Machine

Applies to AQTime 8.81, last modified on January 18, 2022

Java application developers typically have multiple Java Virtual Machines (JVM) installed on the computer in order to test the application in different environments. When profiling a Java application with AQTime, you need to select the JVM you want to use with your application. This topic explains how you can do this.

To set the default JVM

You can view the available JVMs and set the default JVM that AQTime will use to profile Java applications in AQTime options. To select the default JVM:

  • Select Options > Options from AQTime’s main menu. The Options dialog will open.

    Select Tools > Options from the main menu of Visual Studio. The Options dialog will open.

    Select AQTime > Options from the main menu of RAD Studio. The Options dialog will open.

  • Select Services > Java Support from the tree on the left of the dialog to open the Java Support options.

    Select the AQTime > Services > Java Support group in the dialog to open the Java Support options.

    Select Services > Java Support from the tree on the left of the dialog to open the Java Support options.

  • In the Default Java Runtime list, select the needed JVM.

  • Press OK to close the dialog and save the changes.

To use the default JVM with your application

To configure your profiling project to use the default JVM selected in Java options, follow these steps:

  • Open your profiling project in AQTime.

  • Select Run > Parameters from the main menu of AQTime.Select AQTime > Parameters from Visual Studio’s menu.Select AQTime > Parameters from RAD Studio’s main menu. The Run Parameters dialog will open.

  • Select Default Java Runtime from the Select generic host application drop-down list box.

  • Click OK to close the dialog and save the changes.

  • Save the changes made to the project.

For more information about setting up Java profiling projects, see Profiling Java Archives and Profiling Java Classes.

To use a specific JVM with your application

In certain cases, you may need to run and profile your Java application using a specific JVM. In this case, you can explicitly specify this JVM in the run parameters for your application. To do this:

  • Open your profiling project in AQTime.

  • Select Run > Parameters from the main menu of AQTime.Select AQTime > Parameters from Visual Studio’s menu.Select AQTime > Parameters from RAD Studio’s main menu. The Run Parameters dialog will open.

  • Enter the fully-qualified name of the Java application launcher in the Specify custom host application edit box. The path can be any of the following:

    • <JRE>\bin\java.exe
    • <JRE>\bin\javaw.exe
    • <JDK>\bin\java.exe
    • <JDK>\bin\javaw.exe
    Note: The java.exe and javaw.exe launchers are identical, except that javaw.exe has no associated console window. Use javaw.exe when you don't want a command prompt window to appear. The javaw.exe launcher will, however, display a dialog box with an error if the launch fails for some reason.
  • Click OK to close the dialog and save the changes.

  • Save the changes made to the project.

For more information about setting up Java profiling projects, see Profiling Java Archives and Profiling Java Classes.

See Also

Profiling Java Applications
Profiling Java Applications - Overview
Profiling Java Archives
Profiling Java Classes
Profiling Mixed-code Java Applications
Java Support Options Dialog

Highlight search results