Skip to content
Advertisement

Why do I get MissingResourceException

Why does this throw a MissingResourceException ? Am I mistaken or is that not the point of ListResourceBundles is to provide the resources in code?

JavaScript

in a seperate file:

JavaScript

My Error:

JavaScript

Advertisement

Answer

When you get an error, and try to understand the reason, the first step is always to read the stack trace of the error. In this case, the stack trace is

JavaScript

And if you read it, the problem becomes obvious:

Class java.util.ResourceBundle$Control can not access a member of class ResourceBundle_it_IT with modifiers “”

Move the class ResourceBundle_it_IT to its onwn file, where it belongs. make it public as the error message suggests, and the problem disappears.

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement