无法启动应用程序


嗨,我

有一个java swing应用程序,我想通过jnlp启动它,我配置了我的项目Web启动配置,但是当我按下启动按钮时不起作用。你知道为什么吗?

这是错误

Java.lang.NumberFormatException: For input string: "UsersAdministratorDocumentsNetBeansProjectsLoginPagedist"
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.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)

只有这个错误,我们只能告诉您,您的问题是由于String上的parseInt而发生的,这不是int。要纠正此问题,您有两种可能性:

  1. 添加try{}catch(NumberFormatException e){//show error}
  2. 断言你有适当的东西进入parseInt ;)

我有同样的问题。
Netbeans 8.01, JDK 1.8u20, JRE 项目,

运行选项:

  • 启用"以网络启动方式运行"。

应用程序/网络启动选项:

  • 创建的证书密钥库(提示:我使用了"portecle")
  • 代码库:本地执行(预览显示:"file:/C:/..../")

该项目创建的JNLP说;

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<jnlp codebase="file:/C:/<snip>/dist/" href="launch.jnlp" spec="1.0+">
    <information>
        <title>netbeans_prj</title>
        <vendor>bla</vendor>
        <homepage href=""/>
        <description>netbeans_prj</description>
        <description kind="short">netbeans_prj</description>
    <offline-allowed/>
</information>
    <update check="background"/>
    <security>
<all-permissions/>
</security>
    <resources>
        <j2se java-vm-args="-Xmx512m -Xverify:none" version="1.7+"/>
        <jar href="netbeans_prj.jar" main="true"/>
    <jar href="lib/all_ext.jar"/>
</resources>
    <application-desc main-class="<snip>">
    <argument>-h</argument>
<argument>127.0.0.1</argument>
</application-desc>
</jnlp>

相关内容

  • 没有找到相关文章

最新更新