Java Add-in environments

The Java Add-in uses a mechanism known as the dynamic transformation support mechanism to support multiple Java environments (such as IBM JRE, Oracle JRE, Oracle JInitiator, and Zulu OpenJDK) and Java versions (such as, JRE 17 and 18) without requiring any configuration changes. (For a list of supported environments and versions, see the UFT One Support Matrix.)

Note: To support testing applications built in some specific versions of Java environments, you do need to set Java environment variables. 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>.

Back to top

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_One_installdir>\bin\java_shared\bin or <UFT_One_installdir>\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_installdir>/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 Deactivate Dynamic Transformation support (Advanced).

Back to top