简体   繁体   中英

What is the alternative to java applet applets?

I am working on a web application, in which we have one client applet application that will check the certificate is installed on the client's machine or not.

But you all know Mozilla will stop to support applets very soon.

Can anyone suggest what is an alternate option for doing the same?

A good alternative to applets is Java Web Start . If the client has java installed and can run applets then this will work too.

Java Webstart

The other answer is out of date. The Java WebStart (JWS) implementation in the OpenJDK codebase was deprecated in Java 9 and removed entirely in Java 11. This affects all Java distros that are based on OpenJDK... including the Oracle Java distros.

However, all is not lost.

  1. You can still use JWS in releases prior to Java 11. Java 8 is still supported by Oracle, and by other vendors.
  2. A company (Karakun AG) treated the removal of JWS in Java 11 as a business opportunity, and created an open source replacement for JWS in the form of OpenWebStart . There is a feature table that documents the features of the JWS specification that are supported. OpenWebStart is available as a community edition (no support) or with different levels of paid support.

But note:

  1. OpenWebStart does not support applets, and according to the OpenWebStart FAQ, they have no intention of supporting them.

  2. Java Webstart didn't support applets either. It was always an alternative deployment mechanism rather than a way to run code in the user's web browser.

The Real Answer - Rewrite your code

If you are still looking for a direct replacement for applets, forget it. There isn't one. Applets are dead technology. They were terminally ill for decades, and the death knell came in 2016 when Oracle announced that they would be deprecated and withdrawn.

  • If you want a way to deploy and launch a conventional Java desktop application (eg JavaFX or Swing + AWT) then OpenWebStart is a good option. However, the user does need to download and install OpenWebStart to bootstrap the process.

  • Other alternatives supported by Oracle / OpenJDK are to use jlink or jpackage to produce (respectively) a custom JRE or a native executable for your application. These need to be deployed and updated by conventional means.

  • If you have an application that needs to run in your users' web browser, you should look at recoding it in Javascript. Java is no longer a sensible option for this kind of application.

All of the above require you to rewrite your old applet code. TINA .

Java Vaadin , a free web framework.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM