AttachNotSupportedException while running jMockit tests on IBM JRE

前端 未结 6 1193
北海茫月
北海茫月 2020-12-19 16:55

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=

6条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-19 17:17

    I also tried using JMockit to override final methods in a class in a 3rd party library. I got the same problem discussed above, and again adding the VM arg -javaagent:C://jmockit.jar only gave me a different type of error. I am also using the IBM JDK 6.0 that comes with Websphere. It's a shame but it looks like it is an actual impossibility to override final methods: I can't find any other Testing framework that can do it.

提交回复
热议问题