Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 6198196
Votes 0
Synopsis package-info.java: Weird compiler error
Category java:compiler
Reported Against
Release Fixed mustang(b40), 5.0u15-rev(b13) (Bug ID:2121634)
State 10-Fix Delivered, Verified, bug
Priority: 1-Very High
Related Bugs 6278523 , 6196068 , 6201304
Submit Date 20-NOV-2004
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(); }

Work Around
Use cygwin or don't use forward slashes on Windows.

  xxxxx@xxxxx   2004-11-25 02:16:06 GMT
Evaluation
I need a reproducible test case.

  xxxxx@xxxxx   2004-11-20 00:43:05 GMT

Based on the additional information from the submitter I was able to
reproduce the problem on Windows XP.  You need to run it from the
Windows command prompt, cygwin is too helpful.

I cannot create a regression test as I don't have a way to test platform
specific behavior.

  xxxxx@xxxxx   2004-11-25 02:08:04 GMT

SQE (  xxxxx@xxxxx  ) will implement tests for this.

  xxxxx@xxxxx   2004-11-29 18:38:15 GMT

I turns out that it is easy to write test for platform specific
behavior in jtreg, so SQE doesn't need to write a test case.

  xxxxx@xxxxx   2005-05-27 23:03:53 GMT
Comments
  
  Include a link with my name & email   

Submitted On 02-FEB-2007
will there not be a back - port to Tiger (1.5)?


Submitted On 13-DEC-2007
This is cute -- I just ran into this trying to build NetBeans' trunk.  I can only assume nobody is building NetBeans on Windows without using Cygwin (which I have but wasn't using...).


Submitted On 13-DEC-2007
P.S. NetBeans requires use of the Java 5 compiler, so this is *really* cute.


Submitted On 13-DEC-2007
[Clarification: Building NetBeans 6 requires use of the Java 5 compiler.]



PLEASE NOTE: JDK6 is formerly known as Project Mustang