[英]java.util.MissingResourceException: Can't find bundle for base name ResBundle, locale en_GB
I am receiving following exception while I have created a ResBundle
class in same package which extends ListResourceBundle
class. 我在同一个包中创建了一个扩展
ListResourceBundle
类的ResBundle
类时收到以下异常。
java.util.MissingResourceException: Can't find bundle for base name ResBundle, locale en_GB
My calling code 我的通话代码
Locale locale = Locale.getDefault();
ResourceBundle resourceBundle = ResourceBundle.getBundle("ResBundle", locale);
ResourceBundle.getBundle("ResBundle")
tells the classloader to load a resource named "ResBundle" with default package (that is, no package). 告诉类加载器使用默认包(即没有包)加载名为“ResBundle”的资源。 It does NOT mean a resource in the current package that has the referencing class.
它并不意味着当前包中具有引用类的资源。
So try giving the package path and see if the issue gets resolved. 因此,请尝试提供包路径并查看问题是否得到解决。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.