Skip to content

Instantly share code, notes, and snippets.

@xtman
Created March 4, 2013 09:30
Show Gist options
  • Save xtman/5081073 to your computer and use it in GitHub Desktop.
Save xtman/5081073 to your computer and use it in GitHub Desktop.
The html code includes javascript to check if Java Runtime is installed in your browser.
<div id="my_output_div"></div>
<script src="http://java.com/js/deployJava.js"></script>
<script type="text/javascript">
var html = '<ul>';
html += '<li><b>Installed JREs:</b>' + deployJava.getJREs() + '</li>';
html += '<li><b>Version Check (&gt;= 1.6.0?):</b>' + deployJava.versionCheck('1.6.0+') + '</li>';
html += '<li><button onClick="deployJava.installLatestJRE();">Install latest JRE</button></li>';
var div = document.getElementById('my_output_div');
div.innerHTML=html;
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment