Java code support

This topic describes supported Java versions in VuGen, and how to use a custom JRE for Java serialization.

Note: For Java protocols, a full JDK installation is required. For details, see Set up the environment for Java protocols.

About working with Java code in VuGen

By default, VuGen detects the JRE installed on your machine, and uses it for all Java code, when recording and generating scripts. See below for instructions on how to select a custom JRE/JDK version.

The detected JRE is also the default JRE used during replay of Java-related protocols. You can configure VuGen to use the custom JRE/JDK for replay, by defining the path in the runtime settings for the script.

You can install a complete JDK, or just JRE, according to your needs:

JDK

Replay

Compile

JRE

Code generation

Record

Back to top

Using a custom JRE

Configure options and runtime settings, as described in the following steps.

To use a custom JRE:

  1. Install the JDK or JRE, as required.

    For information about supported versions, see the JDK/JRE support matrix, below.

  2. For code generation, define the path to the installed JRE in the Options dialog box. Select Tools > Options > Scripting > Java > JRE > Custom JRE path and browse to the JRE folder.

    Note: This sets the custom JRE to be used for code generation and other actions for all VuGen protocols, including Java protocols.

  3. To use the custom JRE for script replay, define the path to the JRE folder in the Runtime Settings for the individual script. The location depends on the protocol:

    • Web HTTP/HTML, Oracle Web: Runtime Settings > Data Format Extension > Advanced.
    • Web Services: Runtime Settings > JMS > Advanced.

Back to top

JDK/JRE support matrix

The following JRE/JDK versions are supported in VuGen, for all Java protocols:

  Version 8 Version 11 Version 17 Version 21
32‑bit Oracle JDK Common OpenJDK Distributions Common OpenJDK Distributions n/a
64‑bit Oracle JDK Oracle JDK/Common OpenJDK Distributions Oracle JDK/Common OpenJDK Distributions Oracle JDK/Common OpenJDK Distributions

Back to top