0

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.

asked Jan 16, 2013 at 19:50
3
  • 5
    When 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. Commented 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. Commented Jan 16, 2013 at 19:58
  • This suggestion is a duplicate of Stefan's (below), which I have accepted. Thanks again. Commented Jan 16, 2013 at 20:34

1 Answer 1

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.

answered Jan 16, 2013 at 19:53
Sign up to request clarification or add additional context in comments.

2 Comments

I was hoping there might be a way to do this via some other scripting language, or some other web-sitey thing I am not familiar with. But I may have to resort to something as you describe. Thanks.
I've done some quick googling for jar wrappers, and have discovered that there are many options. I'll definitely look into this further, thanks.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.