2010-07-07 121 views
0

當我將GWT國際化與常量一起使用時,我得到一個異常,說「找不到關鍵的資源」。但是Key已經在接口和屬性文件中定義。文件格式爲utf-8GWT國際化

有人可以指出,可能是錯誤的根源。

//Here is my Interface 
public MyLabel extends Constants{ 
@Key("hello") 
public String getHello(); 

} 
//Here is the content of my properties file 
hello = Hello 

//Below is the Usage 
MyLabel label=(MyLabel)GWT.create(MyLabel.class); 
label.getHello(); 
+1

很難用很少的線索來調試,看看可能會出錯。您能否使用該鍵發佈您的某個Message接口的示例,以及該鍵的屬性文件的片段?這可能是您的代碼中的錯誤。 – 2010-07-07 16:18:56

回答