Answer the question
In order to leave comments, you need to log in
Why can't find resources?
I'm trying to add resources to the console application. Clicked "New Resource Bundle" - added to the root of the project. I write in code
ResourceBundle resources = ResourceBundle.getBundle("resources"); // Пробовал и Locale.getDefault() добавлять.
Answer the question
In order to leave comments, you need to log in
Too little data to give a definitive answer.
The point is that the resources should not be in the root of the project, but in the root of the sources. Those. if you have a simple Java application (not maven, etc.), then your sources are more likely to be in the src folder. This is where you need to put the resource file.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question