I wish I had more specifics, I don't have browser or java versions of the client computers having issues. As it stands right now I have a java applet that just checks the version if the client clicks it. Is there a way to check version before the page loads? I'd rather be proactive than reactive on the page. I've checked documentati开发者_Go百科on here but without having access to the digital signature applet code, am having trouble wrapping my head around it.
The deployJava.js
mentioned in the deployment advice is the best option for this applet. If a suitable minimum version of Java is not available (and the end-user cannot or will not install it when prompted), the applet will not run.
Having said that, there are other options. Such as:
- Applet based solutions: (Although I developed both these applets, I now use
deployJava.js
.)- The JRE Version Checker applet. Place it in the same page as the target applet in order to support the version checking.
- Wrapplet. 'Wraps' the target applet and offers (amongst other things) version checking with fall-back options.
- Use JavaScript to check the version. (And do whatever you want if it fails.) E.G.
<html>
<body>
<script type="text/javascript">
document.write(
"<p>java.version: " +
java.lang.System.getProperty("java.version"));
document.write(
"<p>java.specification.version: " +
java.lang.System.getProperty("java.specification.version"));
</script>
</body>
</html>
Final code for Version Java checking. I'm leaving this as an example in case someone (like myself) was having an issue getting deployJava.js to function.
using this app for signing a name to documents
<script src="http://java.com/js/deployJava.js"></script>
<script >
if (deployJava.versionCheck('1.4+')) {
var dir = location.href.substring(0,location.href.lastIndexOf('/')+1);
var url = dir + "plugin2.jnlp";
deployJava.createWebStartLaunchButton(url, '1.4+');
} else {
document.location.href="http://www.java.com/en/download/installed.jsp";
}
</script>
精彩评论