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

package-info.java: Weird compiler error

    Details

    • Subcomponent:
    • Introduced In Build:
      5.0
    • Introduced In Version:
      5.0
    • Resolved In Build:
      b40
    • CPU:
      generic
    • OS:
      windows_xp
    • Verification:
      Verified

      Backports

        Description

        Compiling package-info.java gives this error:

        E:/ws/hostd/bora/vim/vmodl/vim/host/package-info.java:4: package annotations
        should be in file package-info.java
        @wsdlName("Host") package vim.host;

        The file looks like this:

           @wsdlName("Host") package vim.host;
           import vmodl.*;

        Addtional info from submitter:

        I was able to reproduce the problem on WindowsXP using your files.

        My command line was:
                 javac C:/home/pcanning/wsdlName.java
        C:/home/pcanning/package-info.java
        It is important that the slashes be forward slashes not backward slashes.
        If I do
                 javac C:\home\pcanning\wsdlName.java
        C:\home\pcanning\package-info.java
        or
                 javac wsdlName.java package-info.java
        I don't get the error.

        --- package-info.java ---
        @wsdlName("Host") package vim.host;
        import vmodl.*;

        --- wsdlName.java ---
        package vmodl;
        public @interface wsdlName { String value(); }


          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  ahe Peter Ahe
                  Reporter:
                  ahe Peter Ahe
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Imported:
                    Indexed: