Replaying a recording with LR4J

Requirements

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 a supported Linux distribution.

  • JDK and, for convenience when debugging, source for the standard Java libraries installed. If using distro-supplied versions of JDK:

    • RHEL/CentOS/SuSE:
      • java-1.8.0-openjdk-headless java-1.8.0-openjdk-devel packages, or
      • java-11-openjdk-headless java-11-openjdk-devel packages, or
      • java-15-openjdk-headless java-15-openjdk-devel packages.
    • Debian/Ubuntu:
      • openjdk-8-jdk-headless openjdk-8-source packages, or
      • openjdk-11-jdk-headless openjdk-11-source packages, or
      • openjdk-15-jdk-headless openjdk-15-source packages.
  • The ability to copy the LiveRecorder software into this environment.

  • IntelliJ IDEA running in the same Linux environment as your application, or running on a separate Windows, macOS or Linux machine.

  • If the environment is a remote machine or a VM:
    A port (default 9000) opened into the environment for IntelliJ to connect over.
  • The LiveRecorder IntelliJ IDEA Plugin:
    Follow Jetbrains’ Install plugin from repository instructions,
    search for “LiveRecorder” in the Marketplace, press “Install” and restart IntelliJ IDEA.

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.