【问题标题】:Native Bundle throws java.security.NoSuchAlgorithmExceptionNative Bundle 抛出 java.security.NoSuchAlgorithmException
【发布时间】:2013-02-20 21:40:15
【问题描述】:

我正在尝试构建一个本机捆绑包,特别适用于 mac os x,但也适用于 windows。在这两种环境中,.app、.dmg、.exe 都可以正确生成,但是当我运行它们时,我得到了许多 java.security.NoSuchAlgorithmException 异常。例如: 原因:java.security.NoSuchAlgorithmException:SunTlsRsaPremasterSecret KeyGenerator 不可用

原因:java.security.NoSuchAlgorithmException:PBEWithMD5AndDES SecretKeyFactory 不可用

我的程序使用 TLS 来建立 xmpp 连接。而且我还有一个没有加载 HTTPS 的 webview。

有人知道为什么会发生这种情况吗? 我应该注意,如果我单独运行生成的 jar,它工作正常,它只发生在 .exe 和 .app 上。 这是我的 build.xml fx:deploy 代码:

<fx:deploy width="${javafx.run.width}" height="${javafx.run.height}" 
          nativeBundles="all"
          outdir="${basedir}/${dist.dir}" outfile="${application.title}">
  <fx:application name="${application.title}" 
                  mainClass="${javafx.main.class}"/>
  <fx:resources>
      <fx:fileset dir="${basedir}/${dist.dir}"
                  includes="*.jar"/>
      <fx:fileset dir="${basedir}/${dist.dir}" includes="lib/*.jar"/>
  </fx:resources>
  <fx:info title="${application.title}" 
           vendor="${application.vendor}"/>
</fx:deploy>  

感谢您的帮助。

【问题讨论】:

    标签: javafx-2


    【解决方案1】:

    我之前没看过这个帖子:JavaFX WebView Not Loading HTTPS Page

    发生的情况是 jre 的包不包含 /ext 文件夹,因此您必须在构建包时使用脚本复制它。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-01-26
      • 1970-01-01
      • 1970-01-01
      • 2021-11-30
      • 1970-01-01
      • 2017-04-24
      • 2020-02-08
      相关资源
      最近更新 更多