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, the internal JRE installed on your machine is used for all Java code, when recording and generating scripts. See below for instructions on how to select a custom JRE/JDK version.
The internal JRE is also the default used during replay of Java-related protocols (not including the Java protocols). You can configure VuGen to use the custom JRE for replay, by defining the path in the runtime settings for the script.
If you want to use a custom JRE, you can install a complete JDK, or just JRE, according to your needs:
Configure options and runtime settings, as described in the following steps.
To use a custom JRE:
Install the JDK or JRE, as required.
For information about supported versions, see the JDK support matrix, below.
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.
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.
The following JRE/JDK versions are supported in VuGen:
|Version 7||Version 8||Version 11|
|32-bit (for Java over HTTP, Java Record Replay & Java Vuser protocols)||Oracle JDK||Oracle JDK||Common OpenJDK Distributions|
|64-bit (for Java over HTTP, Java Record Replay & Java Vuser protocols)||Oracle JDK||Oracle JDK||Oracle JDK/Common OpenJDK Distributions|