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