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

Roman Kennke roman at kennke.org
Wed Sep 28 14:05:01 PDT 2011


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...

Regards, Roman




More information about the awt-dev mailing list