Backward compatibility

JUnit 4 requires due to Annotation usage JDK 1.5. For many environments, this is a strong limitation, as JDK 1.5 is not allowed to be used in production systems.

RetroWeaver ( is a JDK 1.5 backward compatibility tool to allow JDK 1.5 based development, and JDK 1.4 (down to JDK 1.1) based deployment. For more details see RetroWeaver website.

How to use JUnit 4.x and JDK 1.4 (or previous versions)

There is a sample included, using an ANT build file to compile and weave code, and run JUnit 4.x based tests using JDK 1.4.

See jdk14/sample/build.xml.

Notes to previous RetroWeaver versions:

There is a test included, based on latest RetroWeaver version 2.0Beta4.

The complete JUnit test suite is working now fine.

These bugs have been posted to RetroWeaver, and solved now by the cool guys from RetroWeaver:

Short tutorial how to make these tests for your own:

  1. Download latest version of JUnit (e.g. Copy into .../src-jdk14/3rdParty
  2. Download latest version of RetroWeaver (e.g. Copy into .../src-jdk14/3rdParty
  3. If using other versions, set your specific version info into .../src-jdk14/
  4. Set your paths to your JDK 1.4 and 1.5 in .../src-jdk14/
  5. call .../src-jdk14/build.xml with target test
  6. Check build output for correct execution