java web start应用程序赢得';跑不动

java web start应用程序赢得';跑不动,java,web,java-web-start,Java,Web,Java Web Start,我使用eclipse用java编写了一个简单的程序。该程序需要磁盘访问(读写)和一些internet访问。我想用它创建一个web start应用程序,所以我下载了netbeans。我导入了这个项目,并使用netbeans运行它。一切顺利。之后,我右键单击项目,转到web start=>我选择了本地执行,选择了一个图标,并用我自己创建的密钥对其进行了签名。(我没有选择“允许脱机”) 在那之后,我点击了f11和项目构建。我转到项目文件夹,打开dist文件夹并将所有内容拖到我的桌面(C:\Users\

我使用eclipse用java编写了一个简单的程序。该程序需要磁盘访问(读写)和一些internet访问。我想用它创建一个web start应用程序,所以我下载了netbeans。我导入了这个项目,并使用netbeans运行它。一切顺利。之后,我右键单击项目,转到web start=>我选择了本地执行,选择了一个图标,并用我自己创建的密钥对其进行了签名。(我没有选择“允许脱机”)

在那之后,我点击了f11和项目构建。我转到项目文件夹,打开dist文件夹并将所有内容拖到我的桌面(C:\Users\teddy\desktop\host)。我双击dlaunch.jnla,然后得到错误:无法启动应用程序 我点击了详细信息。错误如下所示:

com.sun.deploy.net.JARSigningException: Found unsigned entry in resource: file:/C:/Users/teddy/workspace/facebooker/dist/facebooker.jar
at com.sun.javaws.security.SigningInfo.getCommonCodeSignersForJar(Unknown Source)
at com.sun.javaws.security.SigningInfo.check(Unknown Source)
at com.sun.javaws.security.JNLPSignedResourcesHelper.checkSignedResourcesHelper(Unknown Source)
at com.sun.javaws.security.JNLPSignedResourcesHelper.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.access$000(Unknown Source)
at com.sun.javaws.Main$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<jnlp codebase="file:/C:/Users/teddy/workspace/facebooker/dist/" href="launch.jnlp" spec="1.0+">
    <information>
        <title>facebooker</title>
        <vendor>teddy</vendor>
        <homepage href=""/>
        <description>facebooker</description>
        <description kind="short">facebooker</description>
    <icon href="007.jpg" kind="default"/>
</information>
    <update check="always"/>
    <security>
<all-permissions/>
</security>
    <resources>
        <j2se version="1.7+"/>
        <jar href="facebooker.jar" main="true"/>
    <jar href="lib/restfb-1.6.14.jar"/>
<extension href="jnlpcomponent1.jnlp"/>
</resources>
    <application-desc main-class="">
    </application-desc>
</jnlp>
我还使用JaNeLA检查jnla文件,这是输出:

JaNeLA Report - version 11.05.17


Report for file:/C:/Users/teddy/Desktop/host/launch.jnlp

Content type application/xml does not equal expected type of application/x-java-jnlp-file
cvc-complex-type.2.4.a: Invalid content was found starting with element 'security'. One of '{resources, application-desc, applet-desc, component-desc, installer-desc}' is expected.
cvc-complex-type.2.4.a: Invalid content was found starting with element 'security'. One of '{resources, application-desc, applet-desc, component-desc, installer-desc}' is expected.
XML encoding not known, but declared as UTF-8
Codebase + href 'file:/C:/Users/teddy/workspace/facebooker/dist/launch.jnlp' is not equal to actual location of 'file:/C:/Users/teddy/Desktop/host/launch.jnlp'.
Optimize this application for off-line use by adding the <offline-allowed /> flag.
Downloads can be optimized by specifying a resource size for 'facebooker.jar'.
The resource download at facebooker.jar can be optimized by removing the (default) value of download='eager'.
Lazy downloads might not work as expected for facebooker.jar unless the download 'part' is specified. 
Downloads can be optimized by specifying a resource size for 'lib/restfb-1.6.14.jar'.
The resource download at lib/restfb-1.6.14.jar can be optimized by removing the (default) value of download='eager'.
The resource download at lib/restfb-1.6.14.jar can be optimized by removing the (default) value of main='false'.
It might be possible to optimize the start-up of the app. by  specifying download='lazy' for the lib/restfb-1.6.14.jar resource.
Lazy downloads might not work as expected for lib/restfb-1.6.14.jar unless the download 'part' is specified. 
Downloads can be optimized by specifying a resource size for '007.jpg'.
Icon loading & use can be optimized by specifying the width and height for 007.jpg
Report for file:/C:/Users/teddy/workspace/facebooker/dist/jnlpcomponent1.jnlp

Content type application/xml does not equal expected type of application/x-java-jnlp-file
XML encoding not known, but declared as UTF-8
Optimize this application for off-line use by adding the <offline-allowed /> flag.
Downloads can be optimized by specifying a resource size for 'lib/forms-1.3.0.jar'.
The resource download at lib/forms-1.3.0.jar can be optimized by removing the (default) value of download='eager'.
The resource download at lib/forms-1.3.0.jar can be optimized by removing the (default) value of main='false'.
It might be possible to optimize the start-up of the app. by  specifying download='lazy' for the lib/forms-1.3.0.jar resource.
Lazy downloads might not work as expected for lib/forms-1.3.0.jar unless the download 'part' is specified. 
JaNeLA报告-版本11.05.17
文件报告:/C:/Users/teddy/Desktop/host/launch.jnlp
内容类型application/xml不等于预期类型的application/x-java-jnlp-file
cvc复杂类型.2.4.a:发现以元素“security”开头的内容无效。需要“{resources,application desc,applet desc,component desc,installer desc}”中的一个。
cvc复杂类型.2.4.a:发现以元素“security”开头的内容无效。需要“{resources,application desc,applet desc,component desc,installer desc}”中的一个。
XML编码未知,但声明为UTF-8
Codebase+href'file:/C:/Users/teddy/workspace/facebooker/dist/launch.jnlp'不等于'file:/C:/Users/teddy/Desktop/host/launch.jnlp'的实际位置。
通过添加标志优化此应用程序以供脱机使用。
可以通过为“facebooker.jar”指定资源大小来优化下载。
通过删除download='eager'的(默认)值,可以优化facebooker.jar上的资源下载。
延迟下载可能不会像facebooker.jar预期的那样工作,除非指定了下载“部分”。
可以通过为“lib/restfb-1.6.14.jar”指定资源大小来优化下载。
lib/restfb-1.6.14.jar上的资源下载可以通过删除download='eager'的(默认)值进行优化。
可以通过删除main='false'的(默认)值来优化lib/restfb-1.6.14.jar上的资源下载。
可以优化应用程序的启动。通过为lib/restfb-1.6.14.jar资源指定download='lazy'。
延迟下载可能不会像lib/restfb-1.6.14.jar预期的那样工作,除非指定了下载“部分”。
可以通过为“007.jpg”指定资源大小来优化下载。
可以通过指定007.jpg的宽度和高度来优化图标加载和使用
文件报告:/C:/Users/teddy/workspace/facebooker/dist/jnlpcomponent1.jnlp
内容类型application/xml不等于预期类型的application/x-java-jnlp-file
XML编码未知,但声明为UTF-8
通过添加标志优化此应用程序以供脱机使用。
可以通过为“lib/forms-1.3.0.jar”指定资源大小来优化下载。
lib/forms-1.3.0.jar上的资源下载可以通过删除download='eager'的(默认)值进行优化。
可以通过删除main='false'的(默认)值来优化lib/forms-1.3.0.jar上的资源下载。
可以优化应用程序的启动。通过为lib/forms-1.3.0.jar资源指定download='lazy'。
延迟下载可能不会像lib/forms-1.3.0.jar预期的那样工作,除非指定了下载“部分”。
# 有人知道这里发生了什么吗

JNLP文件如下所示:

com.sun.deploy.net.JARSigningException: Found unsigned entry in resource: file:/C:/Users/teddy/workspace/facebooker/dist/facebooker.jar
at com.sun.javaws.security.SigningInfo.getCommonCodeSignersForJar(Unknown Source)
at com.sun.javaws.security.SigningInfo.check(Unknown Source)
at com.sun.javaws.security.JNLPSignedResourcesHelper.checkSignedResourcesHelper(Unknown Source)
at com.sun.javaws.security.JNLPSignedResourcesHelper.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.access$000(Unknown Source)
at com.sun.javaws.Main$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<jnlp codebase="file:/C:/Users/teddy/workspace/facebooker/dist/" href="launch.jnlp" spec="1.0+">
    <information>
        <title>facebooker</title>
        <vendor>teddy</vendor>
        <homepage href=""/>
        <description>facebooker</description>
        <description kind="short">facebooker</description>
    <icon href="007.jpg" kind="default"/>
</information>
    <update check="always"/>
    <security>
<all-permissions/>
</security>
    <resources>
        <j2se version="1.7+"/>
        <jar href="facebooker.jar" main="true"/>
    <jar href="lib/restfb-1.6.14.jar"/>
<extension href="jnlpcomponent1.jnlp"/>
</resources>
    <application-desc main-class="">
    </application-desc>
</jnlp>

facebook
泰迪
facebook
facebook

发现以元素“security”开头的无效内容
,这意味着某些元素的顺序错误。JNLP的内容是什么?在文章中添加了JNLP。如果你想访问本地硬盘,那么你需要签署你的jar文件。您可以使用自签名证书进行测试。但我已在应用程序上签名。尝试了所有未签名、自签名和自定义签名的操作:(将
移动到
安全性
元素之后。这可能会修复“无效内容”消息。
主类字段不应为空。