'Are applets dead?

A long time ago I made an applet, when I tried to a open it few days ago in website and it says that there is a security problem and it can not open it.

I Googled it and saw that I need to register it.

I tried to register it but nothing helped.

Can you explain what could make this problem?

The applet is fine and working when I run it from eclipse.



Solution 1:[1]

With recent updates to Java, security is much more strict. Your applet needs to be running the same java version and have a certificate. It's a very strict system...I can't open many java applets myself.

To make it run as an exception, copy the URL that the applet is on. Then open up your Java Control Panel, go to the Security Tab, and at the bottom hit Edit Site List at the bottom. From there, hit Add and paste in your link.

Java Security Tab

That'll allow it to run as an exception.

Solution 2:[2]

tl;dr

Java Applets are gone. You can modify your applet to run as a local app instead.

Today you can build local GUI apps in Java using your choice of three frameworks:

  • Swing (now in maintenance mode)
  • JavaFX (actively developed, led by Oracle and Gluon)
  • SWT (developed by the Eclipse Foundation)

For remote apps written in pure Java but delivered to users as a web app, see Vaadin Flow.

Yes, Java Applets are dead

Oracle has deprecated Java Applet technology, having proven too difficult to integrate securely into web browsers.

All the major web browser makers (Mozilla, Apple, Google, Microsoft, etc.) have phased out support for Java Applets.

Long live Java GUI apps

See white paper by Oracle, Java Client Roadmap Update, 2020-05.

Oracle’s vision for local Java GUI apps is for the developer to deliver a "double-clickable" app bundled with its own JVM slimmed down to include only needed parts. Modern tooling includes jlink and jpackage. Oracle no longer sees Java being generally bundled with operating systems, nor generally being installed by users.

While Java Applets are dead, Swing is still maintained as a required part of every Java implementation. People continue to write Swing apps for use on a local computer. You just cannot run a Swing app within a browser any longer. If you have source code for a Swing-based Applet, you can easily modify it to run as a local Swing app.

Swing’s replacement, JavaFX, is under very active development in the open-source project OpenJFX, a subproject hosted on the OpenJDK project. Releases arrive every six months, around the same time as Java releases.

The Eclipse Foundation continues to offer Standard Widget Toolkit (SWT) as a third platform (besides Swing & JavaFX) for writing Java GUI apps on a local computer.

For an open-source implementation of Java Web Start, see OpenWebStart. Oracle has dropped support for the technology, but others continue to find it a handy way to deliver and launch local Java desktop apps.

If you want to write web apps in pure Java using a Swing/JavaFX style of coding, see Vaadin Flow. Your app executes server-side in a JVM while the user-interface is automatically rendered remotely in the web browser by way of standard web technologies (HTML, CSS, JavaScript/ECMAScript/TypeScript, Web Components).

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Alex K
Solution 2