Execute setup.exe with Java in html

Please. I'm not very familier with Java programmimg and I need to write a command that executes "setup.exe" after the user clicked on a button in an html page
could you help me with the script?

Thanks allot!
Who is Participating?
mmuruganandamConnect With a Mentor Commented:
I don't think that you can do that from the HTML.
Have a look at the following...

You can't really execute any programs directly.  If you have any activeX attached to that, then only you are allowed to do that.
Mayank SAssociate Director - Product EngineeringCommented:
Well, this is not much of a question for a Java expert to answer. Its more for an HTML expert to answer ;-) anyway, you cannot directly invoke an exe from an HTML if you're looking plainly at that.

One way could be -> the HTML contains an Applet tag -> the Applet has permissions and on init (), it starts a Runtime.exec () command which starts the exe -> he he, I'm being too imaginative, am I not ;-) ?
Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

I think you cannot do in this case, and u can try using FTP application...

every browser will pop up when u will click on a file, and asks for users option to save or open it.....it's not a matter of java, it's a matter of HTML and the browser...
Mayank SAssociate Director - Product EngineeringCommented:
But he didn't ask about clicking and saving a file, did he? You mean to give a link to the setup.exe file and then ask the user to click on it to save/ open (run) it?
Do you need the code for a Java Applet that can do this?!
Mayank SAssociate Director - Product EngineeringCommented:
Points - mmuruganandam.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.