antoninus96
antoninus96

Reputation: 77

Run applet from jar in Angular 10

I have to run a Java applet from his jar in an Angular 10 application, I've tried to run on Chrome, IE11 and Edge but all my tries did not work.

I've done the following things:

and this:

<object
  codetype="application/java" classid="java:TableManager.class"
  classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
  archive="my_jar.jar" width="740" height="400">
  <param name="code" value="MyClass.class">
</object>

and this:

<applet code="MyClass.class" archive="my_jar.jar" type="application/x-java-applet" height="300" width="550"></applet>

But nothing worked, do you have any suggestions?

Upvotes: 0

Views: 937

Answers (1)

Stephen C
Stephen C

Reputation: 718758

Many modern web browsers don't support Java applets at all anymore, and those that do require the user to explicitly enable support.

Why? Because Java plugins for web browsers were notorious for security flaws that put the user of risk of having their computer hacked via a malicious applet.

My recommendation is that you change your application architecture to avoid any need of running Java in the user's browser.

If you can't do that, this Oracle page gives instructions for various web browsers on how to get Java working in the browser:

Note that the instructions need to be followed by the end user.

Upvotes: 1

Related Questions