Mailing Lists: Apple Mailing Lists

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

Java application




On Jan 26, 2007, at 1:10 PM, Ian Cheyne wrote:

Hello,

I'd like to define a custom URL that when invoked using the "open" command will either launch my Java application and pass the URL as an argument or, if the application is already open, somehow pass the URL to the open application to open.

I'm not at all certain if this is achievable.


URL and wild carded JNI AppleEvents http://users.spacestar.net/mikehall/javasrc.html#aejni

It's achievable, except for launch events. As It thought it might, this misses those completely. You would need your code up and running before any url's are passed most likely.
It does implement a 'aevt' scheme for URL testing. If the application gets more involved it may have issues that have been discussed on the list before. Carbon (which it uses) / Cocoa (which the jvm) uses incompatibilities. Threading issues, AppleScript and I think AppleEvents in general aren't thread safe. Possibly other problems. But it's achievable and 'open' makes for fairly easy testing.



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



_______________________________________________
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: 
 >(no subject) (From: Ian Cheyne <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.