Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Leaving Swing application ; MRJToolkit/Shutdown Hook



Hi Rüdiger,

MRJQuitHandler has been deprecated for 4 years now.  Have a look at com.apple.eawt.ApplicationListener, which is implemented in any new Java project in Xcode or nearly any of our sample code at http://developer.apple.com.  

Matt Drance . 
Sharing Technologies Evangelist email@hidden
ichat.ical.ab.sync.dotmac.automation.java.dashboard.spotlight.quicklook

On Feb 13, 2008, at 7:06 AM, Will Gilbert wrote:


On Feb 13, 2008, at 9:51 AM, Dipl. Ing. Rüdiger Pape wrote:

i am facing the problem to quit a swing application by using apple-q.
For sure, there a 2 possible solutions:

1. Shutdown Hook
2. MRJQuitHandler from MRJToolkit

Unfortunately, shutdown hook hangs, if a want to show a confirm dialog and MRJQuitHandler is deprecated.
Has anyone found a solution for that issue?


Guten tag!

I think this is already taken care of if you bundle your JAR or JARs into a Application Bundle.

I wrote an ANT task several years ago called "JarBundler", not to be confused with Apple's "Jar Bundler" -- my bad, which wraps a JAR file in an Apple Application Bundle. This process creates the "Application" menu for you.

Download the installation TAR or TAR at:

http://informagen.com/JarBundler/

Install the 'jarbundler-1.9.jar' into your ANT directory -- then execute

$ ant simple

to build the simple demo app and you should see the Command-Q and it should be handled just fine.

--will
Ein amerikanischer Deutschlerner und Java-programmierer _______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden

References: 
 >Leaving Swing application ; MRJToolkit/Shutdown Hook (From: Dipl. Ing. Rüdiger Pape <email@hidden>)
 >Re: Leaving Swing application ; MRJToolkit/Shutdown Hook (From: Will Gilbert <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.