What is the cause of the error message?

Given this error message when running your application:
Exception in thread “main” java.util.MissingResourceException: Can’t find bundle for base name

MessageBundle, locale
And given that the MessageBundle.properties file has been created, exists on your disk, and is
properly formatted.
What is the cause of the error message?

Given this error message when running your application:
Exception in thread “main” java.util.MissingResourceException: Can’t find bundle for base name

MessageBundle, locale
And given that the MessageBundle.properties file has been created, exists on your disk, and is
properly formatted.
What is the cause of the error message?

A.
The file is not in the environment path.

B.
The file is not in the classpath.

C.
The file is not in the javapath.

D.
You cannot use a file to store a ResourceBundle.

Explanation:

ResourceBundle.getBundle is using a resource name; it isn’t called ResourceBundle for nothing.
You can create a custom ClassLoader and use that to load the data.



Leave a Reply 4

Your email address will not be published. Required fields are marked *


Tim

Tim

I would vote for B.