References to Apple JDK internal classes from other projects
Artem Ananiev
artem.ananiev at oracle.com
Thu Jan 19 09:12:00 PST 2012
Hi, Mike et al.,
I'm often contacted from other teams and projects about JDK7 on Mac. At
the current moment, at least two requests are about Apple classes that
are missed in Oracle JDK:
Java3D: they reference apple.awt.CGraphicsDevice
SWT: they use apple.awt.CEmbeddedFrame to embed Swing content
I would expect many other Mac OS X applications written in Java to rely
on classes like these. Quick search for "import apple.awt" in Google
shows at least 2 projects in top 10 results.
There are several options, but none of them looks perfect:
1. Force application developers to fork their code to run with JDK6 and
JDK7+
2. Re-implement all the Apple classes in JDK7 (and place them to the
same package?) It may be very hard, if possible at all, to preserve
exactly the same behavior, though.
3. Add more APIs to com.apple.eawt both in JDK6 and JDK7 to use instead
of direct references to Apple classes. What about classes that are not
related to AWT?
4. Ignore such requests as all the applications relying on apple.*, or
sun.*, or whatever else packages can be declared "unsupported".
Your ideas?
Thanks,
Artem
More information about the macosx-port-dev
mailing list