Replaying a recording with LR4J

Replay environment

A Linux environment with access to the recording file. Usually it’s simplest if this is the same environment in which the application was recorded. However if the recording environment is transient - e.g. a container or on-demand cloud instance - it will be easier to replay in a more interactive environment such as a physical machine or a VM running RHEL, CentOS, Debian, Ubuntu, SuSE or Fedora.

  • JDK and, for convenience when debugging, source for the standard Java libraries installed. If using distro-supplied versions of JDK:
    • RHEL/CentOS: java-1.8.0-openjdk-headless java-1.8.0-openjdk-devel packages or java-11-openjdk-headless java-11-openjdk-devel packages.
    • Debian/Ubuntu: openjdk-8-jdk-headless openjdk-8-source or openjdk-11-jdk-headless openjdk-11-source packages.
  • The ability to copy the LiveRecorder software into that environment.
  • If the environment is a remote machine or a VM: A port (default 9000) opened into the environment for the IDE to connect over.

Replaying a recording

Unzip the file lr4j-replay-*.zip. This creates a directory named lr4j.

To replay a recording:

/path/to/lr4j/lr4j_replay -i /path/to/recording.undo -cp classpath

or if not using the default port of 9000:

/path/to/lr4j/lr4j_replay -i /path/to/recording.undo -cp classpath -p NN

The classpath should point to the same build of jar files as supplied to java at record time. This argument is optional, but if provided will produce better display of variable contents in the IDE.