将Java Swing转换为基于Web的应用程序

Kam*_*ire 16 java swing web-applications

我有Java swing应用程序.我想转换为Web基础应用程序.什么是最简单的方法?有没有可用的工具,最好是开源代码?

小智 16

有一个新的开源项目webswing.org.它是一个Web服务器,您可以在其中部署swing应用程序.应用程序通过websockets呈现为html画布,因此您可以在桌面上获得完全相同的外观.


小智 10

AjaxSwing是一个运行时工具,需要服务器许可证才能用于商业用途.

您可能想尝试Mia Transformer - 该网站的部分是法语 - .他们将Swing Java代码更改为GWT Java代码,GWT将其更改为Javascript,然后如果您需要,可以使用Google V8编译器更快地执行.当然不是100%.我们将尝试一个大型项目,看它是否有效.

提供给我们的另一个链接是SwingWeb.虽然没有检查出来.

将及时向大家发布.如果您遇到可行的解决方案,请分享.

  • 哪里可以买到'Mia Transformer`?在网站上我无法理解如何查找,下载和使用它.. (3认同)

eeq*_*eeq 8

对于Java程序员,Vaadin框架与Java Swing非常相似.

Architecturally, Vaadin and Swing applications are of course quite different (web vs desktop), but because the UI logic in Vaadin applications is run on the server side (in a JVM), all the Java classes and application logic from Swing applications is typically fully reusable. You can see in the hello-world sample how similar the event-diven programming model is to Swing.

Furthermore, Vaadin effectively hides all the web specific details (html, css, rpc,...) from Java application programmers, making it a familiar and effective tool to convert old Swing applications to modern HTML5 web applications.


Sur*_*ran 6

实际上,您可以使用一种神奇的工具将桌面应用程序转换为Web应用程序: AjaxSwing

但请注意,它只能转换非常简单的swing应用程序.如果使用复杂的渲染器,则可能无法获得正确的结果.它也不是免费的.


vin*_*nod 5

您可以考虑Java Web Start,它不会转换应用程序,但您可以将您的应用程序用作基于 Web 的...