标签:
出现错误:
java.lang.ClassCastException: com.ylpw.sms.YZZYSenderUtil cannot be cast to ResourceBundle
百度搜索错误,没有结果。谷歌搜索:http://stackoverflow.com/questions/5694017/specify-java-localization-file
解决方法,修改了一行代码
prop = ResourceBundle.getBundle(this.getClass().getName());//这里需要读取一个配置文件
改成:
prop = ResourceBundle.getBundle("xxx.properties");
错误 java.lang.ClassCastException: com.ylpw.sms.YZZYSenderUtil cannot be cast to ResourceBundle
标签:
原文地址:http://www.cnblogs.com/demingblog/p/5602115.html