Enable JAR files for Java over HTTP

To record with Java over HTTP, you specify which JAR files to use to deserialize the recorded data.

This topic describes how to locate the relevant JAR files and add them to the classpath.

JAR files from Java applets

If your application uses Java applets, you need to download the relevant applet JAR files to add them to the classpath.

To locate and add Java applet JAR files:

  1. Clear the JAR cache by selecting Control Panel > Java > General Tab > Temporary Internet Files > Settings > Delete Files.

  2. Open your application under test (AUT) and perform a few business processes to repopulate the JAR cache with .jar files from your application. Then close your application.

  3. Select Control Panel > Java > General Tab > Temporary Internet Files > View. This lists the JAR cache and should contain only the .jar files used by your application.

  4. Download the files. Try the options below in the order in which they appear. When you succeed, proceed to the next step.

    Option Instructions
    1 For each JAR file, go to the listed URL and download the file. If you cannot download one or more of the JAR files, continue with the next option.
    2
    1. Clear the cache again (Control Panel > Java > General Tab > Temporary Internet Files > Settings > Delete Files).

    2. Open your application again and perform a few business processes. Do not close your application.

    3. Open the Java Console. There should be a message for each JAR file telling you the location it is stored in a temporary file on your computer. The files are usually hashed and do not have .jar extensions. Change the name (including changing each extension to .jar) and copy the file to a known location.

    3

    If the files do not appear in the Java Console, locate the temporary folder as listed in Control Panel > Java > General Tab > Temporary Internet Files > Settings > Location.

    Open the specified location and rename all the files in the sub-folders to .jar. Do not rename the files in the main folder.

  5. Add the JAR files to the Recording Options > Java Environment Settings > Classpath node.

Back to top

JAR files from local Java applications

When the Java application (not applet) is installed on your local computer, all of the JAR files exist on your computer.

To locate and add local JAR files:

  1. Locate the JAR files:

    • Check the batch file that launched the application. All referenced JAR files must be added to the classpath.

    • If you cannot locate the batch file, add all of the JAR files from the application folder and sub-folders to the classpath.

  2. Add the JAR files to the Recording Options > Java Environment Settings > Classpath node.

Back to top

Handle custom serialization and encryption of serialized objects

If the application being recorded uses an application-specific serialization, VuGen is not able to handle the serialized objects. This can happen, for example, if custom encryption is applied to serialized objects.

To enable recording with custom serialization:

  1. Implement Java interface SerializationProviderInterface.
  2. Add the JAR file with the implementation to the Recording Options > Java Environment Settings > Classpath node.
  3. Specify the implementation class name in Recording Options > Java Environment Settings > Java over HTTP > Custom SerializationProviderInterface implementation.

Back to top

See also: