Java – getbundle cannot find the properties file

I'm trying to use a properties file to store my Google Checkout merchant information When I call resourcebundle Getbundle ("com_google_checkout_example_settings");

I received an error:

java.util.MissingResourceException: Can't find bundle for base name com_google_checkout_example_settings,locale en_US

Where do I need to place the properties file so that getbundle () can find it? Do I need to add a locale to the properties file?

Solution

This file needs to be included in your classpath If it is already included in the package, you need to provide the full path - that is, resourcebundle getBundle(“com / google / example / checkout_settings.txt”)

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
分享
二维码
< <上一篇
下一篇>>