Class Loading on Different Opperating Systems



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

.



Relevant Pages

  • Re: how do hackers hack?
    ... in this case MAC address can be the issue but a very insignificant ... I mean that of someone resides on the same network segment then ...
    (microsoft.public.security)
  • Re: The Mac Got Cracked... More Details About The Method
    ... The problem turned out to be in the Mac ... OS X implementation of Java. ... Java in your web browsers. ... going on about whether this was a 'local' or 'remote' exploit. ...
    (comp.sys.mac.advocacy)
  • Re: The Mac Got Cracked... More Details About The Method
    ... The problem turned out to be in the Mac ... OS X implementation of Java. ... Java in your web browsers. ... going on about whether this was a 'local' or 'remote' exploit. ...
    (comp.sys.mac.advocacy)
  • Re: R13 on Tiger
    ... If that is the case, the issue may be resolved either by repairing file permissions for X11, or reinstalling the correct version of X11 from the Mac OS X 10.4 DVD under Optional Installs. ... "You have specified multiple/conflicting Java options" would be reported if combining both the -nodesktop and -nojvm flags, which the R13 LCS matlab shell script will do when you are not the console user. ...
    (comp.soft-sys.matlab)
  • Re: trying to use javax.comm.properties package under Apple OS X
    ... I want to attempt to do the same thing on my Mac iBook running Apple OS ... there is no javax.com.properties package for Mac--running ... Before you beat up too badly on Apple, you should know that the Java ...
    (comp.lang.java.programmer)