I want to execute my jar file on click of button from JSP. Jar file is saved on local machine.

Here is my code:-

```
<a href="#"
onClick="Runtime.getRuntime().exec("java -jar C:/Users/XXX/Desktop/XXX.jar");">Click Here</a>

```

Above code is not working for me

I also tried below code but it is also not working. 

```
<a href="#"
onClick="window.open('file:///C:/Users/XXX/Desktop/XXX.jar')">Click Here</a>

```

Suggestion ?