[英]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.