无法使用jnlp启动jar

时间:2012-06-25 13:25:50

标签: java jnlp

我试图通过jsp部署jnlp jsp文件是这样的:

<%response.setContentType("application/x-java-jnlp-file");

String merchantId = request.getParameter("merchantId");
String restaurantId = request.getParameter("restaurantId");
System.out.println(merchantId+"::"+restaurantId); %>
<?xml version="1.0" encoding="utf-8"?> 
<jnlp spec="1.0+" codebase="http://menuzapp-dev-2.appspot.com/" >
    <information>
        <title>Menuzapp Printing</title>
        <vendor>YONG MOOK KIM</vendor>
        <homepage href="http://menuzapp-dev-2.appspot.com/" />
        <description>print tickets</description>
    </information>
    <security>
        <all-permissions/>
    </security>
    <resources>
        <j2se version="1.6+" />
        <jar href="PrinterApplication.jar" main="true" />
        <jar href="bluecove-2.1.1-SNAPSHOT.jar"/>
        <jar href="gson-1.6.jar"/>
        <jar href="jackson-core-lgpl-1.7.2.jar"/>
        <jar href="jackson-mapper-lgpl-1.7.4.jar" />
    </resources>
    <application-desc main-class="com.PrinterApp" >
      <argument><% out.print(merchantId); %></argument>
      <argument><% out.print(restaurantId); %></argument>
    </application-desc>
</jnlp>

我已经使用相同的证书认证了所有的jar,当我尝试在本地服务器上运行它时,它成功启动了jar,但是当我更改了服务器URL时,我得到了类似的异常:

<jnlp spec="1.0+" codebase="http://menuzapp-dev-2.appspot.com/">
  <information>
    <title>Menuzapp Printing</title>
    <vendor>YONG MOOK KIM</vendor>
    <homepage href="http://menuzapp-dev-2.appspot.com/"/>
    <description>print tickets</description>
  </information>
  <security>
    <all-permissions/>
  </security>
  <update check="timeout" policy="always"/>
  <resources>
    <java version="1.6+"/>
    <jar href="http://menuzapp-dev-2.appspot.com/PrinterApplication.jar" download="eager" main="true"/>
    <jar href="http://menuzapp-dev-2.appspot.com/bluecove-2.1.1-SNAPSHOT.jar" download="eager" main="false"/>
    <jar href="http://menuzapp-dev-2.appspot.com/gson-1.6.jar" download="eager" main="false"/>
    <jar href="http://menuzapp-dev-2.appspot.com/jackson-core-lgpl-1.7.2.jar" download="eager" main="false"/>
    <jar href="http://menuzapp-dev-2.appspot.com/jackson-mapper-lgpl-1.7.4.jar" download="eager" main="false"/>
  </resources>
  <application-desc main-class="com.PrinterApp">
    <argument>SGXX.000001</argument>
    <argument>ag5tZW51emFwcC1kZXYtMnIRCxIKUkVTVEFVUkFOVBiwFQw</argument>
  </application-desc>
</jnlp> ]
    at com.sun.javaws.LaunchDownload.checkSignedResourcesHelper(Unknown Source)
    at com.sun.javaws.LaunchDownload.checkSignedResources(Unknown Source)
    at com.sun.javaws.Launcher.prepareResources(Unknown Source)
    at com.sun.javaws.Launcher.prepareAllResources(Unknown Source)
    at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
    at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
    at com.sun.javaws.Launcher.launch(Unknown Source)
    at com.sun.javaws.Main.launchApp(Unknown Source)
    at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
    at com.sun.javaws.Main$1.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

由于

0 个答案:

没有答案