java.util.MissingResourceException

前端 未结 6 1154
你的背包
你的背包 2021-01-05 15:56

I am getting below exception while running an application. This application read abc.properties file,

Exception in thread \"main\" java.util.MissingResourceExcept         


        
6条回答
  •  一向
    一向 (楼主)
    2021-01-05 16:20

    You just need to add the package name while getting the file

    For example if your properties name is "ABC.properties" in package a.b.c then the below code will work perfectly

    ResourceBundle labels = ResourceBundle.getBundle("a.b.c.ABC");
    

提交回复
热议问题