Error Java lang.ClassCastException: com. xx cannot be cast to ResourceBundle
•
Java
An error occurred:
java.lang.ClassCastException: com.xxx cannot be cast to ResourceBundle
Baidu search error, no results. Google search: http://stackoverflow.com/questions/5694017/specify-java-localization-file
Solution, modify a line of code
prop = ResourceBundle.getBundle(.getClass().getName());//这里需要读取一个配置文件 改成: prop = ResourceBundle.getBundle("xxx.properties");
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码