Launching a desktop application from a web site

本小妞迷上赌 提交于 2019-12-21 04:49:09

问题


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?


回答1:


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.




回答2:


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




回答3:


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?



来源:https://stackoverflow.com/questions/738175/launching-a-desktop-application-from-a-web-site

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!