简体   繁体   English

关于 OpenJDK 11 和 OpenJFX 11(和 Proguard)的迁移问题

[英]Migration issues concerning OpenJDK 11 & OpenJFX 11 (& Proguard)

we are currently migrating a Java application from Oracle JDK 8 (application code delivered by JNLP) to OpenJDK 11 (application code delivered as runnable along with a Java Runtime).我们目前正在将 Java 应用程序从 Oracle JDK 8(由 JNLP 交付的应用程序代码)迁移到 OpenJDK 11(作为可运行的应用程序代码与 Java 运行时一起交付)。 Although we found more or less a working solution in our test environment we still have following issues:尽管我们在测试环境中或多或少地找到了一个可行的解决方案,但我们仍然存在以下问题:

  1. Our application needs JavaFX and we want to use jlink for building.我们的应用程序需要 JavaFX,我们想使用 jlink 进行构建。 Is it recommended to use the OpenJFX jmods supplied on https://gluonhq.com/products/javafx to build an appropriate jlink image using OpenJDK, or are there other options?是否建议使用https://gluonhq.com/products/javafx上提供的 OpenJFX jmods 来使用 OpenJDK 构建适当的 jlink 图像,或者还有其他选择吗?

  2. OpenJFX jmods seems to be officially currently only delivered in version 11 (compiled for JDK 11) on gluonhq, whereas Proguard obfuscation does only work for code compiled for JDK's until version 10 (see https://sourceforge.net/p/proguard/feature-requests/188/ ). OpenJFX jmods 似乎目前在 gluonhq 上的版本 11(为 JDK 11 编译)中正式提供,而 Proguard 混淆适用于为 JDK 编译的代码,直到版本 10(参见https://sourceforge.net/p/proguard/feature -请求/188/ )。 It is unsure when Proguard will support version 11 as well.不确定 Proguard 何时也支持版本 11。 Should we wait until it does, or what options do we have?我们应该等到它发生,还是我们有什么选择? Would it be a good option to download and build the OpenJFX sources targeted to version 10 (I have no clue if this is possible out of the box), or even to stay with the Oracle 10 JDK binaries and/or its javafx jmod files as long as Proguard does not understand OpenJDK 11 code?下载和构建针对版本 10 的 OpenJFX 源是否是一个不错的选择(我不知道这是否可以开箱即用),或者甚至保留 Oracle 10 JDK 二进制文件和/或其 javafx jmod 文件作为只要 Proguard 不理解 OpenJDK 11 代码?

  3. We are further looking for a tool to create user-friendly runnables for Windows and MacOS (eg self-extracting executables without registry modifications).我们正在进一步寻找一种工具来为 Windows 和 MacOS 创建用户友好的可运行文件(例如,无需修改注册表的自解压可执行文件)。 javapackager seems to be not available right now ( http://openjdk.java.net/jeps/343 planned for OpenJDK 12) and supports neither cross-compilation nor an auto-update mechanism. javapackager 现在似乎不可用(计划用于 OpenJDK 12 的http://openjdk.java.net/jeps/343 )并且既不支持交叉编译也不支持自动更新机制。 So we are looking for a tool which can do both a) auto-updating (loading application code or new jlink images dynamically on startup) and b) building runnables for Windows and MacOS.因此,我们正在寻找一种工具,它可以 a) 自动更新(在启动时动态加载应用程序代码或新的 jlink 图像)和 b) 为 Windows 和 MacOS 构建可运行文件。 Is there any good tool supporting something similar to the auto-updating mechanism of Oracle's JNLP launcher that is ready for use in production environments?有没有什么好的工具支持类似于 Oracle JNLP 启动器的自动更新机制,可以在生产环境中使用?

  4. For JNLP we apply code signing.对于 JNLP,我们应用代码签名。 Is it still recommended and possible to sign a) our application code located in jlink images and b) dynamically loaded application code, both built with JDK11+?是否仍然推荐并可以签署 a) 我们位于 jlink 图像中的应用程序代码和 b) 动态加载的应用程序代码,两者都使用 JDK11+ 构建?

Thank you for helping, Peter.谢谢你的帮助,彼得。

For your third question, there's the Open Web Start solution, which enables you to Run JNLP files with the latest Java version.对于您的第三个问题,有Open Web Start解决方案,它使您能够使用最新的 Java 版本运行 JNLP 文件。 It's an open-source reimplementation of the Java Web Start technology.它是 Java Web Start 技术的开源重新实现。 This replacement provides the most commonly used features of Java Web Start and the JNLP standard so that you can continue using applications based on Java Web Start and JNLP without any change.此替换提供了 Java Web Start 和 JNLP 标准最常用的功能,以便您可以继续使用基于 Java Web Start 和 JNLP 的应用程序,而无需进行任何更改。

On your fourth question, you can use the Jarsigner maven plugin, as long as you provide it a private key and the jar's path to sign, you're fine.关于你的第四个问题,你可以使用Jarsigner maven插件,只要你提供一个私钥和jar的签名路径就可以了。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM