简体   繁体   English

Java 11迁移的Applet / JNLP

[英]Applet/JNLP on Java 11 migration

I have an application that runs under Java/JNLP applet and I would like to migrate to Java 11. 我有一个在Java / JNLP applet下运行的应用程序,我想迁移到Java 11。

As you know the applets and JNLP will disappear from Java 11. 如您所知,applet和JNLP将从Java 11中消失。

The goal is to keep my old code and remove the packages that contain the applets, is it possible to do this migration without switching to a new technology? 目标是保留我的旧代码并删除包含applet的软件包,是否可以在不切换到新技术的情况下进行此迁移?

Yes and No. 是和否。

Yes you can keep your java business logic and data handling code (presumed you did a clean separation of your application layers). 是的,您可以保留您的Java业务逻辑和数据处理代码(假设您对应用程序层进行了清晰的分离)。 Eg just convert to a standalone java app and you're fine. 例如,只需转换为独立的Java应用程序,你就可以了。

No , if you look for something to run in the webbrowser then you have to migrate to JavaScript/HTML/JSF/GWT... on the frontend and your java code running on the backend (JEE or Servlets ...). ,如果你想在webbrowser中运行某些东西,那么你必须迁移到前端的JavaScript / HTML / JSF / GWT ...以及在后端运行的java代码(JEE或Servlets ......)。

Regarding the "No", it depends on what kind of application you have. 关于“否”,它取决于您的应用程序类型。 A web application or a standalone application? Web应用程序或独立应用程序?

(1) For a web application you have to recreate the front end part (UI, communication with the server) but you can reuse parts of your logic. (1)对于Web应用程序,您必须重新创建前端部分(UI,与服务器的通信),但您可以重用逻辑的一部分。

(2) For a standalone application (using Swing/AWT/JavaFX ...) you can keep your code, just create a standalone app out of it. (2)对于独立应用程序(使用Swing / AWT / JavaFX ...),您可以保留代码,只需创建一个独立的应用程序即可。 For distribution eg JavaFX offers an application packaging mechanism. 对于分发,例如JavaFX提供应用程序打包机制。

PS: The quickest way could be the conversion to the webstart technology however it was also deprecated and will be also be removed in future. PS:最快的方法可能是转换为webstart技术,但它也被弃用,将来也会被删除。 So I would not use it. 所以我不会用它。

One solution might be the WebStart replacement that Karakun is currently working on: https://dev.karakun.com/webstart/ 一个解决方案可能是Karakun目前正在开发的WebStart替代品: https//dev.karakun.com/webstart/

Currently it is not clear when and how this will come since it is based on a kind of crowd-founding but since everyone can get involved (even with low cost) this is a very good possibility. 目前尚不清楚何时以及如何实现这一点,因为它基于一种人群创立,但由于每个人都可以参与(即使成本低),这是一个非常好的可能性。

Finally, I chose Swing with Getdown which resembles JNLP. 最后,我选择了与Getdown相似的Swing,它类似于JNLP。

A migration to a JEE/Spring solution would have completely modified the operation of my application and still take a lot of time. 迁移到JEE / Spring解决方案会完全修改我的应用程序的操作,但仍然需要花费很多时间。 Tip: try it for yourself Getdown . 提示:亲自尝试Getdown

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

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