Enable .jars for recording with Java over HTTP
To record with Java over HTTP, you must specify which .jar files to use in order to deserialize the recorded data.
This topic describes how to locate the relevant .jar files and add them to the classpath.
Java applets
If your application uses Java Applets, you need to find the relevant .jar files and enable them in the Recording Options > Java Environment Settings > Classpath node:
-
Clear the JAR cache by selecting Control Panel > Java > General Tab > Temporary Internet Files > Settings > Delete Files.
-
Open your application and perform a few business processes to repopulate the JAR cache with .jar files from your application. When you are finished, close your application.
-
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.
-
Download the files. Try the options below in the order in which they appear. When you succeed, proceed to the next step to add the .jar files to the classpath.
-
Option 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.
-
Option 2: Clear the cache again by selecting Control Panel > Java > General Tab > Temporary Internet Files > Settings > Delete Files. Open your application again and perform a few business processes. Do not close your application. 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 don't have .jar extensions. Change the name (including changing each extension to .jar) and copy the file to a known location.
-
Option 3: If the files don't show up 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 all the files in the main folder.
-
Add the .jar files to the Recording Options > Java Environment Settings > Classpath node. For more information, see Java > Classpath recording options.
Local Java applications
When the Java application (not applet) is installed on your local computer, all of the .jar files exist on your computer.
-
Locate the .jar files:
-
Look in the batch file that launched the application. All of the .jar files that are referenced 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.
-
-
Add the .jar files to the classpath in the Recording Options > Java Environment Settings > Classpath node.
Handle custom serialization and encryption of serialized objects
If the application being recorded uses an application-specific serialization, VuGen is not able to handle serialized objects. This can happen, for example, if custom encryption is applied to serialized objects.
To enable recording of such applications:
- Implement Java interface SerializationProviderInterface.
- Add the .jar with the implementation in the Recording Options > Java Environment Settings > Classpath node.
- Specify the implementation class name in Recording Options > Java Environment Settings > Java over HTTP > Custom SerializationProviderInterface implementation.