java webstart deployment toolkit detection fails
I just tried the JWS deployment toolkit as desribed here: http://blogs.oracle.com/thejavatutorials/entry/deployment_toolkit_101 I want to use it to launch an applicati开发者_StackOverflowon (not an applet). But the JRE detection fails completely. I tried it in Chrome, Firefox and Internet Explorer but it always redirects me to the Java download site. But I definitely have Java installed:
java version "1.6.0_22"
Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03, mixed mode)
I also tried it on a 32bit Windows XP in a VM with the same result, java version there is:
java version "1.6.0_07"
Java(TM) SE Runtime Environment (build 1.6.0_07-b06)
Java HotSpot(TM) Client VM (build 10.0-b23, mixed mode, sharing)
When I directly call the getJREs
function of the deployment toolkit it returns nothing.
I'd appreciate any advice on how to make this work.
We have dropped all attempts to autodetect if Java is installed or not in the browser page. Simply provide a Java WebStart link, and have a note below saying essentially "If the link doesn't work, get Java here" and then link to the appropriate detection page on java.com.
I would suggest you do the same.
For me it works perfectly like this:
<html>
...
<head>
...
<script src="http://java.com/js/deployJava.js"></script>
</head>
<body>
...
To run the app click on the button:
<script language="JavaScript">
deployJava.createWebStartLaunchButton('http://download.oracle.com/javase/tutorial/deployment/webstart/examples/webstart_ComponentArch_DynamicTreeDemo/src/dynamictree-webstart.jnlp', '1.6.0');
</script>
</body>
</html>
The bad thing is, if javascript is turned off, the button won't show.
Then you have to do a mime check for: "application/x-java-jnlp-file"
精彩评论