线程“main”中的异常java.util.MissingResourceException:找不到基本名称的包
非常感谢任何帮助...
package sampleA_code2;
...
public class CodeTwoSample {
...
ResourceBundle greetings = ResourceBundle.getBundle("sampleA_code2.GoodMannersBundle");
收到错误:
Exception in thread "main" java.util.MissingResourceException: Can't find bundle for base name sampleA_code2.GoodMannersBundle, locale en_IE
文件“GoodMannersBundle.properties”与“CodeTwoSample.java”位于同一文件夹中...
请问,有什么想法吗? 使用 Mac、NetBeans 12.6... 使用 Java 11、Java 8 进行测试...
谢谢!
Please any help is very appreciated...
package sampleA_code2;
...
public class CodeTwoSample {
...
ResourceBundle greetings = ResourceBundle.getBundle("sampleA_code2.GoodMannersBundle");
Get the error:
Exception in thread "main" java.util.MissingResourceException: Can't find bundle for base name sampleA_code2.GoodMannersBundle, locale en_IE
The file "GoodMannersBundle.properties" is in the same folder as "CodeTwoSample.java" is...
Please, any ideas?
Using Mac, NetBeans 12.6...
Tested with Java 11, Java 8....
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
将属性文件移至
src/main/resources
也不再需要引用该包。
谢谢
Moved the properties files to
src/main/resources
Also no need to reference the package anymore.
Thanks