我用ResourceBundle怎么找不到文件,老是提示
Exception in thread "main" java.util.MissingResourceException:
 Can't find bundle for base name mm, locale zh_CN
清高手指教,非常感谢!!!

解决方案 »

  1.   

    Exception in thread "main" java.util.MissingResourceException:
    Can't find bundle for base name mm, locale zh_CN 你的资源文件没有放到classpath的路径下面!
    程序没有找到!
    放在class编译好的根目录
      

  2.   


    LS言之有理。而且文件名必须叫做
    mm.properties
    或者
    mm_zh.properties
    或者
    mm_zh_CN.properties
      

  3.   

    缺少中文message文件:mm_zh_CN.properties
      

  4.   


    ResourceBundle.getBundle("abc",Locale.CHINA);abc_zh_CN.properties 位于应用classpath下