Our project uses jmockit 0.999.11 for mocking objects for JUnit 4.11 and TestNG 6.9.4 test classes and suites. We are using Maven as dependency mgmt tool and for compiling and execution of these test cases (Windows OS).
Recently, we have migrated our project from JDK 7 to JDK 8 (1.8.0.25). Since then when I try to execute test cases, jmockit gives me an error saying
Running TestSuite
java.lang.IllegalStateException: JMockit requires a Java 5 VM or later.
I checked various blogs about this and have made sure that classpath has jmockit jar ahead of junit jar. Other instructions about adding jdk tools.jar is specific to Mac OS.
So I am not able to figure out what else is required so that jmockit 0.999.11 can successfully identify JDK 8 (u25). Upgrading JMockit jar would be our last resort and we would like to avoid it as much as possible.