Class Loading on Different Opperating Systems
- From: "Rationem" <rationem@xxxxxxxxx>
- Date: 31 Mar 2006 07:09:37 -0800
In an attempt to handle the special CMD+Q on a Mac that resides in the
application menu I had to put in the following code:
if (System.getProperty("os.name").toLowerCase().indexOf("mac")
!= -1)
{
com.apple.eawt.Application app = new
com.apple.eawt.Application();
app.addApplicationListener(new
com.apple.eawt.ApplicationAdapter() {
public void handleQuit(com.apple.eawt.ApplicationEvent
e)
{
attemptToQuit();
}
});
}
This works properly on a Mac but does not work on a windows machine
because the com.apple.eawt.* classes are not avabilible. Is there any
way I can use this code and still maintain the cross-platform aspect of
java?
Thanks,
Adam
.
- Follow-Ups:
- Re: Class Loading on Different Opperating Systems
- From: Steve W. Jackson
- Re: Class Loading on Different Opperating Systems
- From: Chris Smith
- Re: Class Loading on Different Opperating Systems
- Prev by Date: Re: volatile
- Next by Date: Re: volatile
- Previous by thread: JNI FindClass(java/lang/string) causes core dump on AIX 5.2
- Next by thread: Re: Class Loading on Different Opperating Systems
- Index(es):
Relevant Pages
|
|