T .
T .

Reputation: 4944

Provide download link for Java when not installed

I'm writing a Java applet for a small game. When a user doesn't have Java installed, I would like to provide some sort of help. Automatically downloading Java is most likely not an option. How would I go about detecting if Java is installed, and showing a OS-appropriate download button if it's not?

Thanks in advance,

Upvotes: 1

Views: 93

Answers (2)

Andrew Thompson
Andrew Thompson

Reputation: 168825

Use deployJava.js to ensure that a suitable JRE is installed (and then it will write the applet element).

Upvotes: 1

JRL
JRL

Reputation: 78003

Look into JNLP (also called Java Web Start). Here are a couple tutorials:

What's nice about JNLP is that you don't have to code anything, it's already been done for you. And it allows for the automatic download of a JRE if it's not installed.

Upvotes: 2

Related Questions