如何为自动更新应用程序从 Java Web Start (JDK 8) 升级到 jlink (JDK 9+)? [英] How do I upgrade to jlink (JDK 9+) from Java Web Start (JDK 8) for an auto-updating application?

查看:24
本文介绍了如何为自动更新应用程序从 Java Web Start (JDK 8) 升级到 jlink (JDK 9+)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Java 8 和之前的版本有 Java Web Start,它自动- 当我们更改应用程序时更新它.Oracle 已建议用户迁移到 jlink,因为这是新的 Oracle技术.到目前为止,这听起来不错.这带来了许多好处:

Java 8 and prior versions have Java Web Start, which auto-updates the application when we change it. Oracle has recommended that users migrate to jlink, as that is the new Oracle technology. So far, this sounds good. This comes with a host of benefits:

  1. Windows、Mac 和 Linux 上的本机代码
  2. 代码模块化(虽然 Proguard 也这样做)
  3. 使用受支持的新技术.

问题:我找不到使用 jlink 自动更新的规范 Java 解决方案.

人们会认为 Java Web Start 可以继续使用,尤其是如果您随便阅读 本文档.请注意 Java Web Start 继续突出显示的事实.但是有一个美中不足:Oracle 正在弃用 Java Web Start.预定在 JDK 11 中删除.那么,官方是什么前进的道路.如果做不到这一点,人们是否有一种标准的前进方式?

One would think that Java Web Start could continue to be used, especially if one casually reads this document. Notice the fact that Java Web Start continues to be prominently listed. But there's a fly in the ointment: Oracle is deprecating Java Web Start. It's slated for removal in JDK 11. So, what's the official path forward. Failing that, is there a standard way that people proceed?

就本问题而言,以下内容超出范围:

  • 每年向拥有功能丰富的企业解决方案的人支付巨额资金.要分发的应用程序已经打包到一个小于 50MB 的 jar 中.
  • 强制用户运行 InstallShield 风格的应用程序重新安装新版本,然后在每次推送更新时手动卸载旧版本.那真是 1990 年代.
  • 将整个应用程序移植为 Web 应用程序,重写 UI 和客户端逻辑以适应浏览器,并处理随之而来的所有不兼容性.该应用程序的作者致力于 GWT 并确切地知道 Web 浏览器的功能.不幸的是,他们也知道所需的努力程度.
  • 允许用户继续运行旧版本的应用程序.那也是 1980 年代.现代应用程序更新很快,并且支持曾经发布的应用程序的每个版本都是站不住脚的.这就是我父亲的 COBOL 应用程序必须处理的问题,他并不喜欢它.我希望技术进步.
  • 继续使用 Java Web Start.除非 Oracle 改变主意,否则 Java Web Start 是一项注定失败的技术.
  • Paying huge amounts of money yearly to someone with an feature-packed enterprise solution. The application to be distributed is already packaged into a single jar that is smaller than 50MB.
  • Forcing users to run an InstallShield style app to reinstall the new version, and then manually uninstall the old version every time an update is pushed. That's sooo 1990's.
  • Porting the entire app to be a webapp, rewriting the UI and client side logic to fit in a browser and dealing with all the incompatibilities that entails. The authors of the application worked on GWT and know exactly what web browsers are capable of. Unfortunately, they also know the level of effort required.
  • Allowing users to continue to run old versions of the application. That, too, is sooo 1980's. Modern apps update quickly, and supporting every version of the application ever released is not tenable. That's what my father's COBOL application had to deal with, and he didn't enjoy it. I'm hoping technology has progressed.
  • Continuing to use Java Web Start. Until/unless Oracle changes its mind, Java Web Start is a doomed technology.

推荐答案

2019年5月评论观看OpenWebStart项目.

In May 2019 commented to watch the OpenWebStart project.

现在(2019 年 10 月)是时候认真考虑 OpenWebStart.虽然尚未功能完成,但alpha beta OpenWebStart 的发布现在可供下载,在GPL with Classpath exception"许可下.

Now (October 2019) it is time to give OpenWebStart serious consideration. While not yet feature complete, a alpha beta release of OpenWebStart is now available for download under a "GPL with Classpath exception" license.

OpenWebStart 技术详情页面指出:

The OpenWebStart Technical Details page states:

OpenWebStart 基于 Iced-Tea-Web 和 JSR-56 中定义的 JNLP 规范.它将实现 Java Web Start 最常用的功能,并且能够处理任何典型的基于 JWS 的应用程序.我们计划支持 Java 的所有未来版本,从 Java 11 开始.除了 Java 11,OpenWebStart 的第一个版本也将支持 Java 8.

该页面继续声明 OpenWebStart 将支持具有自动更新功能的交互式安装程序和非交互式安装程序.将支持某些 JNLP 功能,并将包括 Java 控制面板的替代品.功能表中提供了更全面的计划功能列表1及其实施状态.

The page goes on to state that OpenWebStart will support interactive installers with auto-update, and non-interactive installers. Some JNLP features will be supported, and it will include a replacement for the Java Control Panel. A more comprehensive list of planned features1 and their implementation status is provided in the feature table.

1 - 如果您的需求不在他们的功能列表中(例如 jlink 支持),您可以联系 OpenWebStart 团队,并提供合适的奖励(例如支付开发人员的钱)来实现该功能你.他们还为付费客户提供该软件的商业版本.

免责声明:我与 OpenWebStart 项目、公司(Karakun)或项目发起人没有任何关系.这不是建议.

这篇关于如何为自动更新应用程序从 Java Web Start (JDK 8) 升级到 jlink (JDK 9+)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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