运行Jar应用程序时出现Java Web Start NumberFormatException

运行Jar应用程序时出现Java Web Start NumberFormatException,java,java-web-start,jnlp,numberformatexception,Java,Java Web Start,Jnlp,Numberformatexception,在尝试使用JWS(JNLP)启动运行Jar应用程序时。它一直在给我这个错误。甚至找不到错误在哪里。任何方向都会有帮助 如果有人能告诉我这个错误的潜在位置,我可以在这里找到这段代码 java.lang.NumberFormatException: For input string: "\Tools_Dev\TestApp\dist" at java.lang.NumberFormatException.forInputString(Unknown Source) at java.l

在尝试使用JWS(JNLP)启动运行Jar应用程序时。它一直在给我这个错误。甚至找不到错误在哪里。任何方向都会有帮助

如果有人能告诉我这个错误的潜在位置,我可以在这里找到这段代码

java.lang.NumberFormatException: For input string: "\Tools_Dev\TestApp\dist"
    at java.lang.NumberFormatException.forInputString(Unknown Source)
    at java.lang.Integer.parseInt(Unknown Source)
    at java.lang.Integer.parseInt(Unknown Source)
    at com.sun.deploy.security.DeployManifestChecker.verifyCodebaseEx(Unknown Source)
    at com.sun.deploy.security.DeployManifestChecker.verifyCodebase(Unknown Source)
    at com.sun.deploy.security.DeployManifestChecker.verify(Unknown Source)
    at com.sun.deploy.security.DeployManifestChecker.verify(Unknown Source)
    at com.sun.javaws.security.AppPolicy.grantUnrestrictedAccess(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)
注意:我已经安装了最新的Java 8并正在使用Netbeans。 如果手动调用jar文件java-jar testTool.jar,jar文件运行良好

更新:

JaNeLA Report - version 11.05.17
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.
Lazy downloads might not work as expected for lib/sqlite-jdbc-3.7.15-M1.jar unless the download 'part' is specified. 
Lazy downloads might not work as expected for lib/poi-3.10-FINAL-20140208.jar unless the download 'part' is specified. 
Lazy downloads might not work as expected for lib/poi-ooxml-3.10-FINAL-20140208.jar unless the download 'part' is specified. 
Lazy downloads might not work as expected for lib/poi-ooxml-schemas-3.10-FINAL-20140208.jar unless the download 'part' is specified. 
Lazy downloads might not work as expected for lib/dom4j-1.6.1.jar unless the download 'part' is specified. 
Lazy downloads might not work as expected for lib/xmlbeans-2.3.0.jar unless the download 'part' is specified. 
Lazy downloads might not work as expected for lib/jaxen-1.1.6.jar unless the download 'part' is specified. 
JNLP文件内容:

JaNeLA Report - version 11.05.17
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.
Lazy downloads might not work as expected for lib/sqlite-jdbc-3.7.15-M1.jar unless the download 'part' is specified. 
Lazy downloads might not work as expected for lib/poi-3.10-FINAL-20140208.jar unless the download 'part' is specified. 
Lazy downloads might not work as expected for lib/poi-ooxml-3.10-FINAL-20140208.jar unless the download 'part' is specified. 
Lazy downloads might not work as expected for lib/poi-ooxml-schemas-3.10-FINAL-20140208.jar unless the download 'part' is specified. 
Lazy downloads might not work as expected for lib/dom4j-1.6.1.jar unless the download 'part' is specified. 
Lazy downloads might not work as expected for lib/xmlbeans-2.3.0.jar unless the download 'part' is specified. 
Lazy downloads might not work as expected for lib/jaxen-1.1.6.jar unless the download 'part' is specified. 

Java工具更新测试
地方的
测试工具
JaNeLa工具中提示的错误,不包括警告和优化:

JaNeLA Report - version 11.05.17
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.
Lazy downloads might not work as expected for lib/sqlite-jdbc-3.7.15-M1.jar unless the download 'part' is specified. 
Lazy downloads might not work as expected for lib/poi-3.10-FINAL-20140208.jar unless the download 'part' is specified. 
Lazy downloads might not work as expected for lib/poi-ooxml-3.10-FINAL-20140208.jar unless the download 'part' is specified. 
Lazy downloads might not work as expected for lib/poi-ooxml-schemas-3.10-FINAL-20140208.jar unless the download 'part' is specified. 
Lazy downloads might not work as expected for lib/dom4j-1.6.1.jar unless the download 'part' is specified. 
Lazy downloads might not work as expected for lib/xmlbeans-2.3.0.jar unless the download 'part' is specified. 
Lazy downloads might not work as expected for lib/jaxen-1.1.6.jar unless the download 'part' is specified. 

看起来是个已知的问题。。。看

按照错误中的指定升级Java版本

不是NB问题,而是javaws问题。我已经测试过了 使用JDK 1.7.0_45和 工作正常。请更新JDK JRE


如果有人有同样的错误,即使使用java 8 Update 101,也可以在此处发布此消息:

在我们的具体案例中,经过几个小时的挖掘,问题最终是NetBeans 7.4版在jar的
MANIFEST.MF的
Codebase
属性上放置了一些无用的垃圾;通过进入项目属性,
Application->Web Start
,然后将
Codebase
更改为
User defined
,并将
Codebase Preview
更改为
*
,应用程序开始正常工作


请务必记住,我们使用的是小程序而不是JNLP应用程序,因此您的里程数可能会有所不同。

我有最新的Java 8更新5,我想这不是问题所在,但在我的情况下,使用Netbeans也会出现这种情况。请务必使用JaNeLA(可用)检查JNLP。@AndrewThompson:谢谢非常好的应用程序。在Netbeans创建的JNLP文件中发现许多问题。现在的问题是如何修复它们:-)一个接一个,很好。@AndrewThompson:很抱歉,问题是评论。的页面不工作。你知道我为什么以及如何获得JaNeLa工具报告错误的帮助吗?我对帮助链接的不好之处在于,它指向一个不再存在的站点。我应该重建Jar以包含该页面。但与此同时,为什么不发布JaNeLA制作的文本报告作为对问题的编辑?我可以看一下,并提供进一步的建议。顺便说一句,您可以忽略报告的所有警告和优化。此时仅关注错误。请确保配置为在调试小程序或JWS应用程序时显示。我使用了“”而不是“*”,因为这会填充JNLP在文件中的位置。为小费干杯。