JDK1.5 - More painful bugs aka Enumeration-Woes: Solved!

By Angsuman Chakraborty, Gaea News Network
Sunday, August 29, 2004

Current Status: Solved

Defect:
When more than one annotation type files are compiled in javac(any of the ways like *.java or @srclist or FileName1.java FileName2.java)
then it emits and error message that it cannot find symbol for statically imported Enums.

However statically importing one level up and de-referencing works.

Create two classes in the same directory as shown below to check the defect.

Just having any one of these files in the compilation list works fine. However more than one causes javac to croak!

//// Simple.java
import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.*;

@Target (METHOD)
public @interface Simple {
String value();
}

//// Simple2.java
import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.*;

@Target (TYPE)
public @interface Simple2 {
String value();
}

Filed under: Java Software
Discussion
June 25, 2007: 5:53 pm

hallo gdrmmg

April 22, 2005: 2:22 pm

@Salu
You can download JDK 1.5 from Sun site - http://java.sun.com/j2se/1.5.0/download.jsp


salu wedadu
April 21, 2005: 6:20 am

i love java so much that i dont what to with my self. i would be very greateful if u allowed me to downloads your jdk1.5.

thanx

YOUR VIEW POINT
NAME : (REQUIRED)
MAIL : (REQUIRED)
will not be displayed
WEBSITE : (OPTIONAL)
YOUR
COMMENT :