JDK1.5 - More painful bugs aka Enumeration-Woes: Solved! jdk1.5 -更痛苦的错误又名计数的疾苦:解决了!
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)当一个以上的注释类型的文件汇编在javac (任何方式一样, *. Java或@ srclist或filename1.java filename2.java )
then it emits and error message that it cannot find symbol for statically imported Enums.然后它会发出和错误讯息无法找到的象征,静态进口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!然而一个以上的原因, javac ,以克劳克!
//// Simple.java / / / /的Simple.java
import java.lang.annotation.Target;进口java.lang.annotation.target ;
import static java.lang.annotation.ElementType.*;进口静态java.lang.annotation.elementtype .* ;
@Target (METHOD) @目标(法)
public @interface Simple {公众@界面简单(
String value();字符串值( ) ;
} )
//// Simple2.java / / / / simple2.java
import java.lang.annotation.Target;进口java.lang.annotation.target ;
import static java.lang.annotation.ElementType.*;进口静态java.lang.annotation.elementtype .* ;
@Target (TYPE) @目标(类型)
public @interface Simple2 {公众@界面simple2 (
String value();字符串值( ) ;
} )
Filed under提起下 Java Software Java软件 | |
| |
RSS 2.0 2.0 | |
Email this Article电子邮件此文章
You may also like to read您也可以想读 |




April 21st, 2005 at 6:20 am 2005年4月21日在上午06时20分
i love java so much that i dont what to with my self.我爱的Java这么多,我不要什么与我的自我。 i would be very greateful if u allowed me to downloads your jdk1.5.我会很greateful如果u让我下载您的jdk1.5 。
thanx
April 22nd, 2005 at 2:22 pm 2005年4月22日在下午2时22分
@Salu @ salu
You can download JDK 1.5 from Sun site -您也可以下载的JDK 1.5从Sun的网站- http://java.sun.com/j2se/1.5.0/download.jsp
June 25th, 2007 at 5:53 pm 2007年6月25日在下午5时53分
hallo gdrmmg hallo gdrmmg