Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4071131

ResourceBundle.getBundle() causes spurious error msgs

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Duplicate
    • Affects Version/s: 1.1.3, 1.1.4, 1.1.6
    • Fix Version/s: None
    • Component/s: tools
    • Subcomponent:
    • CPU:
      x86, sparc
    • OS:
      solaris_2.5.1, windows_95, windows_nt

      Description

      When calling ResourceBundle.getBundle() in an applet running on Windows 95, I get the following error msgs even though it did find the resource bundle "MyBundle":
        File not found when looking for: MyBundle_en_US
        File not found when looking for: MyBundle_en

      There should not have been any errors since the fallback resource bundle was successfully found. This causes confusion to the user. I have included a small test case that reproduces this problem in the attachment. You can run using just the java files manually or use the JWS project.

      ============================================================
      ###@###.### (Jan 10, 1998):

      Similar problem reported for JDK116 by Toshiki Murata (###@###.###)
      at Oki Electric Industry Co., Ltd. :

      Unnecessary messages are issued when using ResourceBundle with appletviwer.
      Please start MessageFormat in i18n demo of JDK demo.
          % cd /usr/local/JDK/demo/i18n/MessageFormat
          % appletviewer example1.html

      If you change Locale menu, you find following messages:
      File not found when looking for: ChoiceResource_da_DK
      File not found when looking for: ChoiceResource_en_GB
      File not found when looking for: ChoiceResource_ja_JP

      These are unnecessary error messages.
      In this demo, language only resources are provided,
      but both language and country are not provided.
      There is no problem.
      But messages are shown.
      These message should be only exception.

      In this case (Resource searching),
      various classes are tested.
      So unexisting class names are tested.
      And ClassNotFoundException is also raised.
      I think errorMsg("filenotfound", name) at 525 line
      in sun/applet/AppletClassLoader.java is unnecessary.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jkoenigsunw Janet Koenig (Inactive)
              Reporter:
              duke J. Duke (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: