Cannot start EMMA code coverage

I have Java SE Development Kit 7u3 installed

I went through some topics similar to this (ex "java" succeeds, "java emmarun" fails ), but my problem is that EMMA does not work for me at all. After launch:

java -cp emma.jar emmarun -cp . Main

he always says:

[EMMA v2.0, build 5312]
emmarun: [MAIN_METHOD_NOT_FOUND] application class [Main] does not have a runnable public main() method
Exception in thread "main" com.vladium.emma.EMMARuntimeException: [MAIN_METHOD_NOT_FOUND] application class [Main] does not have a runnable public main() method
        at com.vladium.emma.rt.AppRunner._run(AppRunner.java:497)
        at com.vladium.emma.rt.AppRunner.run(AppRunner.java:97)
        at com.vladium.emma.runCommand.run(runCommand.java:247)
        at emmarun.main(emmarun.java:27)
Caused by: java.lang.VerifyError: Expecting a stackmap frame at branch target 11 in method Main.<init>()V at offset 4
        at java.lang.Class.getDeclaredMethods0(Native Method)
        at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
        at java.lang.Class.getMethod0(Unknown Source)
        at java.lang.Class.getMethod(Unknown Source)
        at com.vladium.emma.rt.AppRunner._run(AppRunner.java:493)

Compilation works well ("javac Main.java"), and the application works (I get the expected result from "java Main"). Main.java code is a simple HelloWorld application.

public class Main{

public static void main(String[] args) {
    System.out.println("Hello, World");
}

I just wanted to run emmarun on any sample code to see if it works. Well, that is not so. Any ideas on what I'm doing wrong?

+3
source share
1 answer

, , . , , :

+1

All Articles