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 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 |
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:
-
Install the JDK or JRE, as required.
For information about supported versions for each protocol, see the Supported Protocols document.
-
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.