【发布时间】:2014-03-07 16:46:53
【问题描述】:
好的,我想在服务器级别管理常量,所以com.mattbertolini.hermes.Hermes 是一个解决方案。
请查看我的所有步骤:
1-我下载了hermes-1.2.0.jar并导入到正确的eclipse库中(没问题)
2- 在客户端包中创建MyConstantsWithLookup.java
import com.google.gwt.i18n.client.ConstantsWithLookup;
public interface MyConstantsWithLookup extends ConstantsWithLookup {
String myMsg();
}
3- 在同一个客户端包中创建MyConstantsWithLookup.properties 文件。该文件有这一行:
myMsg=Deleted
4- 在 Server 包的 ServerData.java 中
MyConstantsWithLookup my = Hermes.get(MyConstantsWithLookup.class, "");
String extra=my.myMsg();
在 Eclipse 中测试时它工作正常,但我在 Eclipse 中收到警告消息:
[警告] 在 Web 应用程序中找不到服务器类“com.ibm.icu.util.ULocale”,但在系统类路径中找到 [警告] 添加类路径条目'file:/C:/Users/eclipse-jee-juno-SR1-win32-x86_64/eclipse/plugins/com.google.gwt.eclipse.sdkbundle_2.5.0.v201212122042-rel-r42/gwt -2.5.0/gwt-dev.jar' 到此会话的 Web 应用程序类路径 有关其他信息,请参阅:file:/C:/Users/eclipse-jee-juno-SR1-win32-x86_64/eclipse/plugins/com.google.gwt.eclipse.sdkbundle_2.5.0.v201212122042-rel-r42/gwt-2.5 .0/doc/helpInfo/webAppClassPath.html我不确定这个警告是关于什么的?严重吗?
代码运行正常,但为什么 eclipse 会产生这个警告?
【问题讨论】: