Subj : Re: How to launch an external application from Mozilla To : Martin Honnen From : Phil Schwartau Date : Tue Mar 11 2003 01:17 pm Hi, There is further information here: http://bugzilla.mozilla.org/show_bug.cgi?id=154672 "32-bit .exe files will not execute from browser" Phil Martin Honnen wrote: > Gary Lin wrote: > >> Hi, >> >> I am trying to implement my system in such a way that when user opens >> my page in Mozilla and click on a particular link, Mozilla will launch >> an external application, say xemacs. Since this document will always >> be located on the local filesystem and my system will include Mozilla >> internally, so security won't be such a big issue for me (I can tweak >> Mozilla in anyway I wanted to). I understand Mozilla, like rest of >> the browsers, can open application based on MIME type. But since I do >> not want to mess with the exisiting mime type and I am only caring >> about opening the application (not opening a document), this doesn't >> look so promising to me. After some research, I discover some posts >> suggest me to use javascript to achieve this: >> >> >> netscape.security.PrivilegeManager.enablePrivilege('UniversalExecAccess'); >> >> java.lang.Runtime.getRuntime().exec(command); >> >> But this doesn't seem to work for me on Mozilla (I am running 1.2.1). >> I can get the privlege warning dialog, but after I say Yes, the >> command is not getting executed. Any body know why? Or if you have a >> better alternative, please share your insight with me too. Thank you >> all in advance! >> > > > You need Java installed for that and Liveconnect (calling Java from > Javascript) has to work. Unfortunately liveconnect has been troubled > with security exceptions for a long time with Mozilla, I currently have > no access to a system with the latest Sun Java JRE to check whether the > above works with it. > Anyway, check the Java console, it should show error messages if the > code doesn't work. > .