I am getting the below exception when I try to run a simple jMockit/JUnit test using IBM JDK. Has anyone faced this issue? I tried given -Dcom.ibm.tools.attach.enable=
Above answer to use -javaagent is correct. If you're using maven it's a little tricky, so here is how I did it:
org.apache.maven.plugins
maven-dependency-plugin
2.5.1
getClasspathFilenames
properties
2. Add -javaagent to surefire plugin
org.apache.maven.plugins
maven-surefire-plugin
2.13
-javaagent:${com.googlecode.jmockit:jmockit:jar} -XX:-UseSplitVerifier
3. Also, you don't have to, but I'd recommend using a relatively newer version of jmockit. This issues was detected in 1.1 (prior to September 2012 fix by @Rogério, but adding -javaagent fixes it regardless. For reference I am using the latest version available in maven central (2.5) as of this comment:
com.googlecode.jmockit
jmockit
1.5
test