I am having two java projects, animal project and animal-test project. In animal project I am having an annotation interface called Animal like as shown below
Animal.java
package com.animal;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public @interface Animal{
String name();
}
Along with this I am having an interface MakeSound.java which has a method called makesSound().
Now I have build and created animal jar file including the dependencies, then I have imported animal.jar in my Second Project animal-test. I create a class called AnimalTest.java I now build and create a jar file animal-test.jar and when I run the jar file like java -jar animal-test.jar I got the following exception
no main manifest attribute, in animal-test.jar
Can anyone please help me on this.