简体   繁体   English

JavaFX自包含的应用程序缺少密码加密服务吗?

[英]JavaFX self-contained apps are missing the Cipher cryptographic service?

For some reason, JavaFX does not seem to currently support any algorithms for the Cipher cryptographic service when the application is executed after the self-contained deployment, as described here . 出于某种原因,JavaFX的似乎并不在应用程序的自包含的部署后执行目前支持任何算法的密码加密服务,如所描述这里

Given this code: 给出以下代码:

import java.security.Security;
import java.util.Iterator;
import javafx.application.Application;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.scene.Scene;
import javafx.scene.control.ListView;
import javafx.stage.Stage;



public final class Main extends Application
{
    @Override
    public void start(final Stage stage)
    {
        final ObservableList<String> ol = FXCollections.observableArrayList();
        final ListView<String> lv = new ListView(ol);

        for (final Iterator<String> iter = Security.getAlgorithms("Cipher").iterator(); iter.hasNext();)
            ol.add(iter.next());

        final Scene s = new Scene(lv, 500, 400);

        stage.setScene(s);
        stage.sizeToScene();
        stage.show();
    }
}

There is no problem getting populated output with various algorithms if this code is ran locally through the java launcher , but gives an empty list if the application has been packaged as self-contained . 如果此代码通过java启动器在本地运行,则使用各种算法填充输出是没有问题的,但是如果应用程序已打包为自包含代码,则将提供一个列表。

However, I have also stumbled upon this: 但是,我也偶然发现了这一点:

Only a subset of Java Runtime is included by default. 默认情况下,仅包含Java Runtime的一个子集。 Some optional and rarely used files are excluded to reduce the package size, such as all executables. 排除了一些可选的和很少使用的文件,以减小程序包的大小,例如所有可执行文件。 If you need something that is not included by default, then you need to copy it in as a post-processing step. 如果您需要默认情况下未包含的内容,则需要将其复制为后处理步骤。 For installable packages, you can do this from the config script that is executed after populating the self-contained application folder. 对于可安装软件包,可以从填充自包含应用程序文件夹后执行的配置脚本中执行此操作。 See Section 6.3.3, "Customization Using Drop-In Resources." 请参见第6.3.3节“使用嵌入式资源进行定制”。

Could the quoted paragraph be the probable cause? 引用的段落可能是原因吗? What kind of workaround would be needed in order to get this functionality included into the self-contained runtime? 为了使此功能包含在独立的运行时中,需要哪种解决方法?

Thank you. 谢谢。

查看此链接 ,默认情况下未捆绑捆绑的JCE。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 自包含JavaFX应用程序中的包含图标 - Include icon in Self-Contained JavaFX application 在 Eclipse 中设置 JavaFX 自包含构建时遇到问题 - Trouble setting up a JavaFX self-contained build in Eclipse 在Eclipse中创建JavaFX自包含应用程序(使用自定义JDK) - Create JavaFX self-contained application (with custom JDK) in Eclipse JavaFX:将参数传递给自包含应用程序不起作用 - JavaFX: passing Arguments to a Self-Contained Application does not work Javapackager – 本机打包/独立应用程序附加信息 - Javapackager – native packaging / self-contained apps additional information 独立的jar文件 - Self-contained jar File 如何将动态JVM命令行标志传递给自包含的JavaFX应用程序? - How can dynamic JVM command line flags be passed to a self-contained JavaFX application? 部署 JavaFX 应用程序、创建 JAR 和自包含应用程序以及本机安装程序的最佳方式是什么 - What is the best way to deploy JavaFX application, create JAR and self-contained applications and native installers 如何在不使用 Maven/Gradle/IDE 的情况下部署自包含的 JavaFX 应用程序? - How to deploy a self-contained JavaFX application without using Maven/Gradle/IDEs? 如何使用捆绑在JavaFX 2自包含应用程序中的JRE在Mac OS X上启动可运行的JAR? - How to use the JRE bundled in a JavaFX 2 self-contained application to start a runnable JAR on Mac OS X?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM