public class GetCanonicalName { public static void main(String[] args) { System.out.println(Person.class.getCanonicalName()); } } //// import javax.ejb.Entity; import javax.ejb.AccessType; import javax.ejb.Id; import javax.ejb.GeneratorType; import java.io.Serializable; @Entity(access = AccessType.FIELD) public class Person implements Serializable { @Id(generate = GeneratorType.AUTO) Integer id; String name; }