0

I have a application built on Java Applets, Swing and AWT. I want to migrate the source code to Java 11.

Java 11 Applets will not be supported, and even JavaWebStart is being removed.

So I have below questions 1) how should I migrate my application? 2) Will the existing application with applet code work in Java11?

Example: There is a applet embedded in a webpage, which gets downloaded on client machine to fetch client details like IP, Device name etc. After fetching the required details, it calls a servlet deployed in weblogic server which saves this information into Database.

Deepti
  • 85
  • 1
  • 11

2 Answers2

4

You have to migrate your application to a "normal" non Applet desktop application. All applet code will be removed from jdk and cannot be run from a browser (all / most dropped support for applets).

WebStart was til now the valid and proposed alternative. But now it is deprecated as well. To get a WebStart like behavior, like updates, you should change your deployment process, e.g. using one of these tools:

wumpz
  • 8,257
  • 3
  • 30
  • 25
  • Will the non-applet desktop application be able to communicate with the server to store information? I have updated an example scenario which is using applet code. – Deepti Aug 03 '18 at 09:34
  • 1
    Sure. How do you communicate now? Do you request a server using jaxrs or something like that? If you are lucky you do not need to change a line of code. – wumpz Aug 03 '18 at 11:33
  • Application is deployed on weblogic server, it has a JSP page which is invoked. In JSP page, applet is embedded using tag. – Deepti Aug 06 '18 at 04:20
  • That is only deployment. How do you communicate with your server? Using JSP you are able to give some initialisation parameters, but not to communicate ongoing with the server. – wumpz Aug 06 '18 at 06:39
  • i am sorry I am not getting your question, JSP page is invoked with servlet call. – Deepti Aug 06 '18 at 09:39
  • 1
    The server generates a fixed HTML page and sends it to the client. The client initializes the applet from your JSP page (deployment). But then the Applet runs on its own. You are stating that the applet then calls a servlet on your server. This call a desktop application can do as well. – wumpz Aug 06 '18 at 13:18
  • If choice is to re-write the code, then which technology should i be using? – Deepti Aug 08 '18 at 11:14
1

About WebStart: One solution might be the WebStart replacement that Karakun is currently working on: https://dev.karakun.com/webstart/

About Applet: Actually I would say that there simply will be no way to support Applets starting with Java 11. So the best solution would be to migrate applets to a standalone application. Here you can have a look at the webstart based solution I linked on the top or create a native build with a bundled Java runtime. Here install4J (https://www.ej-technologies.com/products/install4j/overview.html) is the solution that I prefer at the moment.

Hendrik Ebbers
  • 2,570
  • 19
  • 34