Your problem has nothing to do with EMMA. Because your jar command
>jar cvf a.jar ABC.class
does not create a proper manifest with Main-Class attribute, everything will fail even with EMMA out of the picture (try "java -jar a.jar" and you will see a similar error message from the JVM itself).
I am getting on running EMMA according to the instructions, but I am getting errors ... on running
java -cp emma.jar emmarun -jar a.jar
ANy help ....
public class ABC
{
public static void main(String []args)
{
int i=0;
for (i=0;i<100;i++)
{
int sum=0;
sum+=i;
}
}
}
javac ABC.java
jar cvf a.jar ABC.class
java -cp emma.jar emmarun -jar a.jar
[EMMA v2.0, build 4217]
emmarun: failed to load Main-Class manifest attribute from [C:\Downloads\Emma\a.jar]
look at your manifest and copy it into this thread. It maybe doesn't have a Main-Class entry????
Anonymous,
Your problem has nothing to do with EMMA. Because your jar command
>jar cvf a.jar ABC.class
does not create a proper manifest with Main-Class attribute, everything will fail even with EMMA out of the picture (try "java -jar a.jar" and you will see a similar error message from the JVM itself).
For your reference, "-jar" option (EMMA's or original JVM's) only works if the jar manifest points to a class with main() method: http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/java.html#-jar