"java" succeeds, "java emmarun" fails

Disclaimer: I am new to java and emma. Details:

  • I installed emma and worked through some of the examples. No problems.
  • I have a java project with several files that I want to get in the coverage report.
  • I am printing "javac -d out * .java". No mistakes.
  • I type "java -cp out Main". The program works fine, and I get the expected result.
  • I type "java emmarun -cp out Main". I get the following:

    emmarun: [MAIN_METHOD_NOT_FOUND] the application class [Main] does not have a runnable public main () method. An exception in the stream "main" com.vladium.emma.EMMARuntimeException: [MAIN_METHOD_NOT_FOUND] the application class [Main] does not have the main () method running on com .vladium.emma.rt.AppRunner._run (AppRunner.java UP46) on com.vladium.emma.rt.AppRunner.run (AppRunner.java:97) on com.vladium.emma.runCommand.run (runCommand.java : 247) on emmarun.main (emmarun.java:27) Called: java.lang.IllegalAccessException: class com.vladium.emma.rt.AppRunner $ Invoker cannot access class member s Main with modifiers "public static" at sun.reflect.Reflection.ensureMemberAccess (Unknown source) in java.lang.reflect.AccessibleObject.slowCheckMemberAccess (Unknown source) in java.lang.reflect.AccessibleObject.checkAccess (Unknown source) in java.lang.reflect.Method.invoke (Unknown source) at com.vladium.emma.rt.AppRunner $ Invoker.run (AppRunner.java:655) in java.lang.Thread .run (Unknown source)

"Main.java" :

public class Main {
    public static void main( String[] args ) {
        NetworkSimplexTest nst = new NetworkSimplexTest();
        nst.test();
    }
}

, . , , - emma , .

, "", java . ?

0
1

, public, .

0

All Articles