jSince JDK 1.6, javac has disabled access to new *internal*
classes/packages.
But it only operates when compiling against an rt.jar image, not your
just built class files ..
So I'd suppose that sun.awt.event was new in 1.6 or later.
-phil.
On 9/28/2011 2: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...
Regards, Roman