How to run a Swing application on a web page?

强颜欢笑 提交于 2021-02-17 05:40:09

问题


I have created a Swing application in Netbeans that is basically a chat system (between multiple clients and server using socket programming).

Now I wanted to run this application on a webpage. Is this possible without changing any code?


回答1:


Now I wanted to run this application on a webpage. Is this possible without changing any code?

No. It would have to be a JApplet to be embedded in a web page, and applets have been effectively killed off. See Java Plugin support deprecated and Moving to a Plugin-Free Web.

On the other hand, a desktop application (based on a JFrame) can be launched from a link on a web page using Java Web Start.

Edit

Scrap that advice regarding JWS, apparently it too is being deprecated as of Java 9.



来源:https://stackoverflow.com/questions/42250660/how-to-run-a-swing-application-on-a-web-page

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!