Newsletter sign-up
View all newsletters

Enterprise Java Newsletter
Stay up to date on the latest tutorials and Java community news posted on JavaWorld

JavaWorld Daily Brew

How to use Emma code coverage in jdk1.7?



Recently i moved jdk1.6 to jdk1.7.Emma code coverage tool working fine in jdk1.6.but It did not working in jdk1.7.It throws following error.

emma:
[emmajava] EMMA: no coverage data collected at runtime [all reports will be empty]
[emmajava] [EMMA v2.0, build 5312]
[emmajava] emmarun: [MAIN_METHOD_NOT_FOUND] application class does not have a runnable public main() method
[emmajava] Exception in thread "main" com.vladium.emma.EMMARuntimeException: [MAIN_METHOD_NOT_FOUND] application class does not have a runnable public main() method
[emmajava] at com.vladium.emma.rt.AppRunner._run(AppRunner.java:497)
[emmajava] at com.vladium.emma.rt.AppRunner.run(AppRunner.java:97)
[emmajava] at com.vladium.emma.runCommand.run(runCommand.java:247)
[emmajava] at emmarun.main(emmarun.java:27)
[emmajava] Caused by: java.lang.ClassFormatError: Illegal local variable table length 5 in method ()V
[emmajava] at java.lang.Class.getDeclaredMethods0(Native Method)
[emmajava] at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
[emmajava] at java.lang.Class.getMethod0(Unknown Source)
[emmajava] at java.lang.Class.getMethod(Unknown Source)
[emmajava] at com.vladium.emma.rt.AppRunner._run(AppRunner.java:493)
[emmajava] ... 3 more

How to solve this? I need to know emma code coverage tool running jdk1.7?