3

我安装了 Java SE Development Kit 7u3

我经历过一些与此类似的主题(例如“java”成功,java emmarun“失败),但我的问题是 EMMA 根本不适合我。我运行后:

java -cp emma.jar emmarun -cp . Main

它总是说:

[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)

编译运行良好(“javac Main.java”)并且应用程序正在运行(我从“java Main”获得预期的输出)。Main.java 的代码是简单的 HelloWorld 应用程序。

public class Main{

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

我只是想在任何示例代码上运行 emmarun 以查看它是否正常工作。好吧,事实并非如此。关于我做错了什么的任何想法?

4

1 回答 1

1

这似乎在一些地方突然出现。到目前为止,我发现的解决方案是:

于 2013-09-10T19:20:49.863 回答