Where should the file with the properties be stored?

It produces an error on the line:

ResourceBundle rb = ResourceBundle.getBundle("in"); 

Exception in thread "main" java.util.MissingResourceException: Can't find bundle for base name in, locale be_BY at java.util.ResourceBundle.throwMissingResourceException(Unknown Source) at java.util.ResourceBundle.getBundleImpl(Unknown Source) at java.util.ResourceBundle.getBundle(Unknown Source) at Runner.main(Runner.java:9)

    2 answers 2

    A file can be stored anywhere provided that the path to the file is included in the classpath.

      Or in the directory with the project or specify the path completely.

      • Try full name ResourceBundle rb = ResourceBundle.getBundle("in.properties"); - Gorets