我是把JRE放到了项目布署里,如果客户端访问没安装时就自动到指定地址去下载并安装
<script type="text/javascript">
var javawsInstalled = false;
var isIE = false;
var isICE = navigator.userAgent.indexOf("ICEBrowser") >= 0;
if (navigator.mimeTypes && navigator.mimeTypes.length)
javawsInstalled = navigator.mimeTypes['application/x-java-jnlp-file'];
else
isIE = true;
function insertLink(url, name) {
if(!javawsInstalled){
url = "http://localhost:8080/jre.exe";
}
document.write("<a href=\"" + url + "\">" + name + "</a>");
/*
else {
document.write("Need to install Java Web Start");
document.write(" -- for more information, visit ");
document.write("<a href=\"http://java.sun.com/products/javawebstart/\">" );
document.write("the Java Web Start page");
document.write("</a>");
}
*/
}
</script>
<script type="text/javascript">
var javawsInstalled = false;
var isIE = false;
var isICE = navigator.userAgent.indexOf("ICEBrowser") >= 0;
if (navigator.mimeTypes && navigator.mimeTypes.length)
javawsInstalled = navigator.mimeTypes['application/x-java-jnlp-file'];
else
isIE = true;
function insertLink(url, name) {
if(!javawsInstalled){
url = "http://localhost:8080/jre.exe";
}
document.write("<a href=\"" + url + "\">" + name + "</a>");
/*
else {
document.write("Need to install Java Web Start");
document.write(" -- for more information, visit ");
document.write("<a href=\"http://java.sun.com/products/javawebstart/\">" );
document.write("the Java Web Start page");
document.write("</a>");
}
*/
}
</script>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货