I am trying to execute a local executable jar from an html page, so I originally tried using javascript window.open(“/Users/guest/desktop/fileName”). This almost works. It opens up the folder where the jar is located and selects the jar, but it does not execute the jar. Then I saw threads on here about how opening the file is not possible because of security problems.
I came across this page, which I feel like should have my answer: http://www.html5rocks.com/en/tutorials/file/dndfiles/
But all that page talks about is how to read and write to files, not how to open them. Is opening local files still not possible? If it is, how can I go about it?
Here is my HTML code in case it may help.
<html>
<head>
<script type="text/javascript">
function open_win()
{window.open("/Desktop/folder/jarFile.jar")
}
</script>
</head>
<body>
<input type="button" value="Open jar" onclick="open_win()" />
</body>
</html>
I don’t think you’ll be able to do that. If you need to execute a jar, you should look into JavaWebstart (and serve that jar from the server).