我已切换到最新的 JDK 7,但我遇到了使用 ant 运行 emma 代码覆盖率的问题。它抛出以下错误:
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 <init>()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
我已阅读有关解决此错误的问题的问题。但由于以下错误,我无法更新 emma 插件。
No repository found at http://download.eclipselab.org/eclemma/beta/2.0.0/update/.
No repository found at http://download.eclipselab.org/eclemma/beta/2.0.0/update/.
如何解决此错误?
如何在 JDK 1.7 中运行 emma 代码覆盖率?
谁能帮我?