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

Missing semi in import statement causes compiler exception

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      1.0beta
    • CPU:
      sparc
    • OS:
      solaris_2.3
    • Verification:
      Not verified

      Description

      I was compiling an applet that began

      - - - - - - - - - - - - - - - - - - - - - - - -
      /* multi-line comments bla bla bla */

      import awt.*
      import net.www.html.URL;
      - - - - - - - - - - - - - - - - - - - - - - - -

      (notice the missing ';' after the 'awt.*') and got the right error
      message from the compiler, except that the compiler first threw an
      exception. Here it is:

      - - - - - - - - - - - - - - - - - - - - - - - -
      java.tools.java.SyntaxError
              at java.lang.Exception.<init>(Exception.java)
              at java.tools.java.SyntaxError.<init>(SyntaxError.java)
              at java.tools.java.Parser.expect(Parser.java)
              at java.tools.java.Parser.parseFile(Parser.java)
              at java.tools.javac.BatchEnvironment.parseFile(BatchEnvironment.java)
              at java.tools.javac.Main.compile(Main.java)
              at java.tools.javac.Main.main(Main.java)
      Bookmark.java:20: ';' expected.
      import awt.*
                  ^
      1 error

      - - - - - - - - - - - - - - - - - - - - - - - -

        Attachments

          Activity

            People

            Assignee:
            ahoffsunw Arthur Hoff (Inactive)
            Reporter:
            duke J. Duke (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: