简体   繁体   English

启动时出现Java Webstart错误

[英]Java Webstart error when launching

I have an EJB 3.0 project using webstart that I am trying to deploy to JBoss AS 7.1.1 as a WAR. 我有一个使用webstart的EJB 3.0项目,试图将它作为WAR部署到JBoss AS 7.1.1。 I can get to the html page just fine, but when I click the webstart link it tries to download JRE 1.7 from http://java.sun.com and pops up with this error: 我可以很好地进入html页面,但是当我单击webstart链接时,它尝试从http://java.sun.com下载JRE 1.7并弹出此错误:

"AutoDL?BundleId=68742" on java.sun.com is not a Java installer.

Here is the directory structure of my war: 这是我战争的目录结构:

root of war(dir)
-->GrahamsProjClient-webstart.jnlp
-->GrahamsProjStartAppPage.html
-->app(dir)
    -->GrahamsProjClient.jar(The actual client project)
-->META-INF(dir)
    -->context.xml(blank file)
    -->MANIFEST.MF
-->WEB-INF(dir)
    -->web.xml
    -->classes(dir) contains my compiled servlet
    -->lib(dir)
        -->jboss-servlet-api_3.0_spec-1.0.0.Final.jar
        -->jnlp-servlet.jar

Here are links to the important files from the war: 以下是战争重要文件的链接:

GrahamsProjClient-webstart.jnlp --> http://pastebin.com/zwkm1zz3 GrahamsProjClient-webstart.jnlp-> http://pastebin.com/zwkm1zz3

<?xml version="1.0" encoding="UTF-8"?>
<jnlp codebase="$$codebase">
 <information>
     <title>Grahams Project</title>
     <vendor>Graham</vendor>
     <description>desc</description>
 </information>
 <resources>
   <j2se version="1.6"/>
   <jar href="GrahamsProjClient.jar"/>
 </resources>
 <application-desc/>
</jnlp>

GrahamsProjStartAppPage.html --> http://pastebin.com/EXu8Z5dZ GrahamsProjStartAppPage.html-> http://pastebin.com/EXu8Z5dZ

web.xml --> http://pastebin.com/KK3fPPY9 web.xml-> http://pastebin.com/KK3fPPY9

GrahamsProjServlet.java --> http://pastebin.com/iC9JDiTL GrahamsProjServlet.java-> http://pastebin.com/iC9JDiTL

What could be causing this? 是什么原因造成的?

After fiddling with it for a while I ran into the solution. 摆弄了一段时间后,我遇到了解决方案。 In the GrahamsProjStartAppPage.html the deployJava.createWebStartLaunchButton() command needs to have 1.6.0+ instead of 1.6.0 . GrahamsProjStartAppPage.htmldeployJava.createWebStartLaunchButton()命令必须具有1.6.0+而不是1.6.0 So the html file now looks like this: 因此,html文件现在看起来像这样:

<body>
<!-- ... -->
<script src=
  "http://www.java.com/js/deployJava.js"></script>
<script>
    // using JavaScript to get location of JNLP
    // file relative to HTML page
    var dir = location.href.substring(0,
        location.href.lastIndexOf('/')+1);
    //var url = dir + "GrahamsProjClient-webstart.jnlp";
    var url = "http://127.0.0.1:8080/GrahamsProjClient/GrahamsProjClient-webstart.jnlp"
    deployJava.createWebStartLaunchButton(url, '1.6.0+'); //changed from 1.6.0 to 1.6.0+
</script>
<!-- ... -->
</body>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM