Is there a way to disable restrictions of javac 1.6.0_22 that prevent me from using JRE internal classes like sun.awt.event.*
?
I'm not looking for:
I just want to know if it is possible or not, and if it is then how.
I have found the answer myself.
When javac is compiling code it doesn't link against rt.jar
by default.
Instead it uses special symbol file lib/ct.sym
with class stubs.
Surprisingly this file contains many but not all of internal sun classes.
In my case one of those more-internal-than-usual classes was sun.awt.event.IgnorePaintEvent
.
And the answer to my question is: javac -XDignore.symbol.file
That's what javac uses for compiling rt.jar
.