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

Netscape understands width=X%; appletviewer doesn't (throws exception)

    XMLWordPrintable

    Details

    • Subcomponent:
    • CPU:
      generic, x86, sparc
    • OS:
      generic, windows_nt

      Description

      Netscape Navigator will let you specify an
      applet's width as a percentage. AppletViewer
      crashes ungracefully when you try to do so.
      It should instead use some default page size
      (600 pixels?).

      ======================================================================
      Another bug report via the web. brian.klock@eng 1998-06-16

      [ Bug also occurs with jdk12beta3 ]

      Save the following html as x.html and run
       ''appletviewer x.html''

      <BODY>
      <APPLET WIDTH="x" HEIGHT="bla" CODE=Test.class>
      </APPLET>
      </BODY>


      You'll get a MissingResourceException with the
      following stack trace:

      java.util.MissingResourceException: Can't find resource
              at java.lang.Throwable.<init>(Compiled Code)
              at java.lang.Exception.<init>(Compiled Code)
              at java.lang.RuntimeException.<init>(Compiled Code)
              at java.util.MissingResourceException.<init>(Compiled Code)
              at java.util.ResourceBundle.getObject(Compiled Code)
              at java.util.ResourceBundle.getString(Compiled Code)
              at sun.applet.AppletMessageHandler.getMessage(Compiled Code)
              at sun.applet.AppletPanel.showAppletStatus(Compiled Code)
              at sun.applet.AppletPanel.init(Compiled Code)
              at sun.applet.AppletViewer.<init>(Compiled Code)
              at sun.applet.StdAppletViewerFactory.createAppletViewer(Compiled Code)
              at sun.applet.AppletViewer.parse(Compiled Code)
              at sun.applet.AppletViewer.parse(Compiled Code)
              at sun.applet.AppletViewer.main(Compiled Code)

      Note the non-numeric value for the <APPLET> tag's
      WIDTH= and HEIGHT= attribute.

      The error message (that is, this stack trace) is very
      misleading about the real cause of the problem.

      Analysis:
      ========

      Appletviewer is searching for an error message
      text to report the invalid number format of the
      WIDTH=/HEIGHT= attribute (with key:
      appletpanel.badattribute.exception, see the source
      for sun.applet.AppletPanel.init() )

      The text for this key is missing in appletviewer's
      resources.

      ======================================================================

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              kwalrathsunw Kathy Walrath (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: