【发布时间】:2015-03-23 00:38:55
【问题描述】:
我整天都在与这个作斗争,我根本无法弄清楚我做错了什么。我在 netbeans 中有一个项目,根据 netbeans 教程中的方法,我为其创建了一个 Web 起始页,但是每次我尝试将教程项目或我的项目作为 Web 启动运行时,我都会收到以下错误:
java.lang.NumberFormatException: For input string: "\Users\<snip>"
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)
我的 jnlp 文件是:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<jnlp codebase="file:/C:/Users/<snip>/dist/" href="launch.jnlp" spec="1.0+">
<information>
<title>...</title>
<vendor>me</vendor>
<homepage href=""/>
<description>...</description>
<description kind="short">...</description>
</information>
<update check="background"/>
<security>
<all-permissions/>
</security>
<resources>
<j2se version="1.8+"/>
<jar eagar="true" href="<snip>.jar" main="true"/>
</resources>
<application-desc main-class="<snip>">
</application-desc>
</jnlp>
非常感谢您对此的帮助
【问题讨论】:
-
请务必使用 JaNeLA 检查 JNLP,可通过我的share drive 获取。
-
出于某种原因,我认为它试图将我的路径设置为 intiger
-
@user2352274 尝试删除代码库部分,它现在是可选的并升级您的规范版本。例如:
<jnlp href="launch.jnlp" spec="7.0+"> -
感谢您的评论,我试了一下,但仍然遇到同样的错误
-
@user2352274 这只能意味着以下两件事之一:(1)您没有运行您认为正在运行的程序(如果您完全删除了 jnlp 中对 C:/Users 的引用,您可以'没有得到引用它的错误) - 这可能是由于缓存或(2)问题出在你的 jnlp 中的某个地方,你没有显示......
标签: java java-web-start jnlp