Java Reference
In-Depth Information
}
}
But there's more! You still don't get to handle “normal” (to Mac users) Mac-style Quit,
Preferences, Print, or About requests (Cmd-Q, Cmd-comma, Cmd-P, or Application→About,
respectively). For these options, you need to use some classes in the
com.apple.eawt
pack-
age, which are not included in current JDKs.
See Also
For older releases, you can read about this in the Apple Developer Documentation that
comes with Mac OS X.
See
Mac OS X for Java Geeks
by Will Iverson (O'Reilly) for more information on Mac OS
X. Apple has been slowly moving away from Java, so it no longer maintains very much doc-
umentation on it. However, Apple's list of System Properties was still available at
Apple's
developer site
as of January 2014. As of that same time, Oracle has some ancient Sun articles
on Mac Java:
“Bringing your Java Application to Mac OS X”
and
“Bringing your Java Ap-
which in Java 7 fail to compile with the following error message:
Access restriction: The method addApplicationListener(ApplicationListener)
from the type Application is not accessible due to restriction on required
library
/Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home/jre/lib/rt.jar
I used to provide an adapter class,
com.darwinsys.macosui.MacOSAppAdapter
, which
made the now-restricted classes easier to use, but discontinued it when the corresponding
classes disappeared from the JDK. The code is still available on my
GitHub repo
. You may
be able to find some additional articles on
Apple's developer site
.
It seems you may be best off living with the use of System properties to adapt to the OS X
environmnent.