Tomer Vax
Tomer Vax

Reputation: 11

Is it possible to embed a java swing application in a modern browser webpage?

I created a simple Java swing application, and I want to embed it in an html webpage. I've searched online for answers, but nothing seems to work. I've already tried both applets and Java web start (Though I might be missing something). Is it possible to do so, and if so, how?

Thank you very much!

P.s. I'm asking this probably frequently asked question only because many of the old answers are not relevant anymore.

Upvotes: 1

Views: 2320

Answers (2)

alexp
alexp

Reputation: 891

Hi and welcome to Stack Overflow.

You might be interested in CheerpJ (https://leaningtech.com/pages/cheerpj.html)

CheerpJ is solution to run any Java application and applet via HTML5/WebAssembly/JavaScript. Both AWT and Swing UIs are fully supported. You can see a Swing based demo here: https://leaningtech.com/pages/swingdemo.html

Full disclosure: I am the lead dev of CheerpJ and CTO of Leaning Technologies, the company behind this product.

Upvotes: 2

Basil Bourque
Basil Bourque

Reputation: 340200

Java Applet tehnology is being phased out by both Oracle (owner of Java) and by the browser makers (Mozilla, Apple, Google, etc.).

Oracle is also phasing out Java Web Start. See Java Client Roadmap Update of 2020-05.

An open-source fork of Java Web Start continues as OpenWebStart.

You might consider rebuilding your app as a Vaadin web app, using form layout with widgets in a manner similar to Swing.

Upvotes: 1

Related Questions