I get this error while trying to run a JUnit Test on eclipse Oxygen Using Ibm's jdk8.
Is there any known bug in this version of jdk? How can I fix/avoid it?
I get this error while trying to run a JUnit Test on eclipse Oxygen Using Ibm's jdk8.
Is there any known bug in this version of jdk? How can I fix/avoid it?
Seems like the unit test uses PowerMock, which does not currently support IBM JDK.
PowerMock tries to load an agent via HotSpot Attach Mechanism, but it should use J9 attach mechanism instead.
See the following issues for details:
Worked by adding the Mocking-Library path as VM Argument to the JRE as already stated by apangin.
To do that:
Window
→ Preferences
→ Java
→ Installed JREs
: select JDK, edit it and add the following to Default VM Arguments
:
-javaagent:<YOUR_M2_REPO_PATH>/org/jmockit/jmockit/1.9/jmockit-1.9.jar