JUnit 4 is backward compatible with JUnit 3. You will have to limit yourself to the JUnit 3 API, obviously, since annotations cannot be set for jdk1.4. The big problem is that the JUnit 4 classes will be compiled using jdk1.5, which the java 1.4 compiler will probably not like. Since you cannot use the newer functionality anyway, you should probably stick with JUnit 3.
source share