<AWT Dev> Can't compile (external) code against sun.awt.event package?

Omair Majid omajid at redhat.com
Wed Sep 28 14:35:59 PDT 2011


On 09/28/2011 05:05 PM, Roman Kennke wrote:
> Hi,
>
> I am trying to compile the Cacio project against vanilla OpenJDK7. One
> of the classes references IgnorePaintEvent. This class cannot be
> compiled:
>
> [INFO] Compilation failure
>
> /home/roman/src/hg/caciocavallo/shared/src/main/java/sun/awt/peer/cacio/CacioComponentPeer.java:[70,20] error: package sun.awt.event does not exist
> /home/roman/src/hg/caciocavallo/shared/src/main/java/sun/awt/peer/cacio/CacioComponentPeer.java:[726,20] error: cannot find symbol
>
>
>
> It used to work when I explicitely set the bootclasspath to an OpenJDK
> build that I just built before (snippet from ant script:
>
>          <javac srcdir="${dir.src.shared.classes}"
>                 destdir="${dir.build.shared.classes}"
>                 bootclasspath="${openjdk}/classes"
>                 debug="${compile.debug}"
>                  />
>
> However, now that JDK7 is out I was thinking it would be great to
> compile against a vanilla OpenJDK7 rt.jar. I verified that the class is
> in that rt.jar and that I am really using the JDK7 javac. I wonder why
> javac cannot find it. Cacio code uses a lot of other internal classes
> (sun.awt.AppContext, sun.awt.SunToolkit, etc etc) and it only issues
> warnings about those. I think I must be missing something...
>

Try setting the property "ignore.symbol.file" to true [1][2].

HTH,
Omair

[1] http://bugs.sun.com/view_bug.do?bug_id=6544224
[2] http://andrew-haley.livejournal.com/695.html



More information about the awt-dev mailing list