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

package-info.java: Weird compiler error

XMLWordPrintable

    • 5.0
    • 5.0
    • b40
    • generic
    • windows_xp
    • Verified

        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(); }


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

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: