Share this page

# Java code support

This topic describes working with Java code 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 Java environment.

In this topic:

## 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:

Item | Use
--- | ---
JDK | Replay Compile
JRE | Code generation Record

For supported versions, see the Supported Protocols document.

## 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 for each protocol, see the Supported Protocols document.

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.

## See also

- Set up the Java environment

https://admhelp.microfocus.com VuGen,Professional Performance Engineering,Performance Engineering for Developers 8942
Tips to improve your search results... OpenText™ Virtual User Generator Help Center OpenText™ VuGen Help 26.1-26.3 All View Local Help Center View Online Help Center Version: