The Java Add-in uses a mechanism that supports multiple Java environments (such as IBM JRE, Oracle JRE, Oracle JInitiator, and Zulu OpenJDK) and Java versions (such as, JDK 1.6.x and 1.7.x) without requiring any configuration changes. (For a list of supported environments and versions, see the UFT One Support Matrix.) This mechanism is known as the dynamic transformation support mechanism.
Note: To work, or stop working, with Java IBM versions 1.7 or later you do need to modify the JAVA_TOOL_OPTIONS environment variable. For details, see Java environment variables.
Dynamic transformation support mechanism
The dynamic transformation support mechanism adjusts the Java Add-in support classes according to the Java environment and version used. The mechanism uses the Tool Interface of the Java Virtual Machine (JVMTI).
When you run the Java Add-in on different Java environments, the dynamic transformation support mechanism is invoked by the -agentlib:jvmhook option defined in the JAVA_TOOL_OPTIONS environment variable.
The Java agent searches for the jvmhook.dll according to the java.library.path system property. You can identify any override of this system property using the Java command line: -djava.library.path = <path>.
Notes about java.library.path property
If you overwrite the java.library.path system property, the Java agent still can identify jvmhook.dll as long as it is located in paths defined by the PATH environment variable, in the java.library.path, or in system folders (WINNT\system32, Windows\System32, or Windows\SysWOW64).
When the Java add-in is installed, UFT One copies the jvmhook.dll to System32 or SysWOW64 system folder. If UFT One fails to do that, depending on your OS, add the <UFT installation folder>\bin\java_shared\bin or <UFT installation folder>\bin\java_shared\bin64 folder or any folder where jvmhook.dll is present to the PATH environment variable.
By default, the value of the java.library.path system property is the system path. If your application is loaded with a different library path, you must either add the jvmhook.dll to a location within the java.library.path, or change the java.library.path to contain <Windows installation folder>/system32.
The <JRE root folder>/bin folder is always located in the java.library.path. If needed, you can manually copy the jvmhook.dll to this folder. However, if you need to modify more than one computer, we recommend modifying the batch file that alters the java.library.path.
For task details, see Disable Dynamic Transformation support (Advanced).