The server application was written earlier in java and on the client computer was running java Applet. Now copied to the application on nodeJs. On the page there is a button on which the applet should start and perform its function. How to call it from nodeJs code?

public class MyAppletNew extends Applet { @Override public void paint(Graphics g) { super.paint(g); g.drawString("Hello Applet", 200, 50); } } 

Here is the html:

 <body> <h1> Hi html works </h1> <applet code="MyAppletNew.class" archive="AppletTest.jar" width=320 height=320> </applet> </body> 

Is it possible to do the same not in HTML, but in javascript?

  • Earned with html. This is the coordinates I incorrectly indicated. - Helena2977
  • If the answer helped you, mark it as accepted. - Nofate

1 answer 1

Typically, embedding an applet in an HTML document looks something like this.

 <applet code="MyApplet.class" archive="MyApplet.jar" width=120 height=120> </applet> 
  • The code attribute points to the name of a class inherited from java.applet.Applet
  • The archive attribute contains the URL of your JAR file containing the applet.