views:

353

answers:

3

Is it feasible to launch an application via a browser / URL? What are the options for doing this?

I know the way to do it with IE and Windows (which usually doesn't work). Ideally, I would like this to be browser independent.

Our application is RCP, so in theory Java Web Start could work, we would just have to do some significant changes to how we deliver our application to users, which I would like to avoid. Our web server code is currently all Java if that makes a difference.

I pretty much gave up on this until I clicked a url on Apple's site, which in turn launched iTunes.

How does Apple do that?

A: 

If this is OS independent, then you can't rely on any specific program being available. What kind of program would you want to launch anyway?

Zifre
+9  A: 

iTunes registers itself as a protocol handler for custom itms:// and itmss:// protocols. When you hit a URL with that protocol - after a step of indirection on Apple's web servers, in this case - iTunes launches to handle it, much like your browser launches to handle http:// URLs or your email program launches to handle mailto: URLs.

This isn't "cross-platform", per se, but it does work on every platform out there, as URL handlers exist and do the same thing everywhere.

It has the disadvantage of only working if the application is already installed, which is why you may want to have a splash page that instructs people to install the application if necessary.

Jim Puls
+1  A: 

Silverlight 3 and Adobe Air will let you launch applications outside the browser.

CodeToGlory