I have a Java desktop application, and a website where users can download the .jar file.
I would like to have a button on the website that the user can click to check if the application will run on his computer (i.e. does he have the correct version of Java installed on his system).
Please note that I am not trying to check if Java is enabled in the browser (as deployJava.js will do), but instead to check if it is installed on his system.
My users are not very tech-savvy, and I hope to make this as easy as possible.
Thanks for your help.
-
5When your users aren't tech-savy, I would recommend you to wrap your jar in a windows installer which also checks if java is installed and automatically downloads and installs it when not.Philipp– Philipp2013年01月16日 19:52:30 +00:00Commented Jan 16, 2013 at 19:52
-
My preference is to not have to repackage the jar file. And, if I do need to use an installer, I would hope to find a system-independent solution. But I might be out of luck on both fronts :).Thanks for your suggestion, I will keep it in mind.Clo Knibbe– Clo Knibbe2013年01月16日 19:58:22 +00:00Commented Jan 16, 2013 at 19:58
-
This suggestion is a duplicate of Stefan's (below), which I have accepted. Thanks again.Clo Knibbe– Clo Knibbe2013年01月16日 20:34:13 +00:00Commented Jan 16, 2013 at 20:34
1 Answer 1
There is no way to do this via JavaScript. A better solution would be to use a system specific jar launcher that checks if Java is installed and then either installs/launches the java prorgam or outputs an error message.