有关OpenJDK 11&的迁移问题OpenJFX 11(和Proguard) [英] Migration issues concerning OpenJDK 11 & OpenJFX 11 (& Proguard)

查看:352
本文介绍了有关OpenJDK 11&的迁移问题OpenJFX 11(和Proguard)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们目前正在将Java应用程序从Oracle JDK 8(由JNLP交付的应用程序代码)迁移到OpenJDK 11(作为可运行的应用程序代码与Java Runtime一起交付).尽管我们在测试环境中或多或少地找到了可行的解决方案,但仍然存在以下问题:

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). Although we found more or less a working solution in our test environment we still have following issues:

  1. 我们的应用程序需要JavaFX,我们希望使用jlink进行构建.是否建议使用 https://gluonhq.com/products/javafx 上提供的OpenJFX jmods使用OpenJDK构建适当的jlink图像,还是有其他选择?

  1. Our application needs JavaFX and we want to use jlink for building. 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?

OpenJFX jmods似乎目前仅正式发布在gluonhq的版本11(为JDK 11编译)中,而Proguard混淆处理仅对编译的代码起作用.适用于JDK 10之前的版本(请参见 https://sourceforge.net/p/proguard/feature-requests/188/).不确定何时Proguard也将支持版本11.我们应该等到它出现,还是有什么选择?是一个很好的选择,下载并构建针对版本10的OpenJFX源代码(我不知道是否有可能立即使用),甚至是将Oracle 10 JDK二进制文件和/或其javafx jmod文件保留为一个好选择.只要Proguard不了解OpenJDK 11代码?

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/). It is unsure when Proguard will support version 11 as well. 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?

我们正在进一步寻找一种工具,用于为Windows和MacOS创建用户友好的可运行文件(例如,无需注册表修改的自解压可执行文件). javapackager现在似乎不可用( http://openjdk.java.net/jeps/343为OpenJDK 12计划),并且既不支持交叉编译,也不支持自动更新机制.因此,我们正在寻找一种可以执行以下操作的工具:a)自动更新(在启动时动态加载应用程序代码或新的jlink图像),以及b)构建适用于Windows和MacOS的可运行文件.是否有任何好的工具可以支持类似于Oracle JNLP启动器的自动更新机制的东西,并且可以在生产环境中使用?

We are further looking for a tool to create user-friendly runnables for Windows and MacOS (e. g. self-extracting executables without registry modifications). 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. 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. 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?

对于JNLP,我们应用代码签名.是否仍然建议并可以签名a)位于jlink映像中的我们的应用程序代码和b)动态加载的应用程序代码(均使用JDK11 +构建)?

For JNLP we apply code signing. 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+?

谢谢您的帮助,彼得.

推荐答案

第三个问题是打开网络开始解决方案,使您可以使用最新的Java版本运行JNLP文件.它是Java Web Start技术的开源重新实现.此替换提供了Java Web Start和JNLP标准的最常用功能,因此您可以继续使用基于Java Web Start和JNLP的应用程序,而无需进行任何更改.

For your third question, there's the Open Web Start solution, which enables you to Run JNLP files with the latest Java version. It's an open-source reimplementation of the Java Web Start technology. 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.

关于第四个问题,您可以使用 Jarsigner maven插件,只要您为其提供私钥和jar的签名路径,就可以了.

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.

这篇关于有关OpenJDK 11&的迁移问题OpenJFX 11(和Proguard)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆