Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: handleOpenFile(ApplicationEvent) not being called
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: handleOpenFile(ApplicationEvent) not being called




On Sep 22, 2006, at 5:15 PM, email@hidden wrote:


Aren't they both using the JavaApplicationStub, either directly or via the prelude script? The script that I was having problems with was not using JavaApplicationStub at all - it was calling Java directly.

You convinced me this shouldn't matter when you brought up that it might be that JavaApplicationStub hung around to continue handling AppleEvent open documents where command line launch doesn't. JavaApplicationStub is strictly a launcher too, it should not hang around any longer than the command line launch code. Just parses the Info.plist and starts the JVM is what we've been told in the past.
The AppleEvent handling almost has to be included with the JVM code itself to continue working after launch.
But you are correct that I didn't test to eliminate any doubt.
I just did and command line still seems to handle events just as well. I changed my prelude script to this...


# Execute the Java-app in the current process.  See 'exec' in 'man sh'.
#exec "$here/$cmd" "$@"

java -cp ../Resources/Java/doc.jar dnd.test.DocumentMonster

and it continued working just fine for launch and subsequent open documents.

And I just tested dragging to the dock instead of the app icon and that works fine as well. I would still suspect the Launch Services stuff got out of sync as your original problem. Open document handling at java 1.5 seems pretty solid to me.


Mike Hall mikehall at spacestar dot net http://www.spacestar.net/users/mikehall http://sourceforge.net/projects/macnative



Attachment: smime.p7s
Description: S/MIME cryptographic signature

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

This email sent to email@hidden

References: 
 >Re: handleOpenFile(ApplicationEvent) not being called (From: Greg Guerin <email@hidden>)
 >Re: handleOpenFile(ApplicationEvent) not being called (From: Michael Hall <email@hidden>)
 >Re: handleOpenFile(ApplicationEvent) not being called (From: email@hidden)



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

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.