applet alternative - Launch from browser

386 views Asked by At

Recently I found an interesting Java applet which works pretty fine for electronic signature, but due to the recent NPAPI stuff with Chrome browser, I've considered it would be a good thing to migrate this applet to a Java application. HTML5/javascript/etc is not a possibility.

The special requisite is that the application should be launched from a browser, despite not being an applet.

The best approach I have found is as follows:

  • Create an installer which would create a java executable file in the local user's PC.
  • Create a javascript function to detect whether the application is installed in the computer (just as iTunes does/used to do).
  • In order to launch the application, create a custom URI Schema handler which would launch the application when found, sending the required parameters to the application (just like the applet does).

Everything sounds pretty smooth, but it's got certain drawbacks:

  • It's meant to work on different PC's. That means the URI Schema handler and the application MUST be installed/set up in every single computer I want to use the application in.
  • Migrating the applet code to a java application. It is an old application which i did not write, and it's got a single class with over four thousand lines.

With that in mind, I could not think of a better option. Is this viable? Any recommendation?

Thanks in advance.

0

There are 0 answers