Note: If you are searching for webstart in Forms 12c please have a look here.
Many Oracle Forms customers, which already did the migration to the latest Forms version (126.96.36.199.0) from 6i or earlier have realized, that the new applet in which their application is now running is in some situations not that comfortable. Especially the Browser bar is maybe annoying.
Also in some cases we found out, that there is a misbehaviour in Forms 11g – the focus on the forms application is lost. For some users this can be really nasty, especially if the application is used heavily with the keyboard and speed is essential. By the way Google will cancel the NPAPI support for its Browser Chrome – other vendors could follow. So webstart is discussed as an alternative for Forms, since it relying on the use of the Java plugin.
So there is the Java Webstart feature in the JRE since version 1.4.2, which can be also used with Forms (since it is running in an applet).
So you need to create a JSP file with the correct parameters. I will not describe how to do that in this article (You can find a description here)
But if you try this, you will see some problems. First you cannot change the sizing of the application. Second if you close the Formsapplication or the Java Webstart window itself the corresponding processes in windows will still be executed. They transform into kind of a “zombie process”. So what to do? Well for the first part, there is a simple solution. You do not want to change the JSP file, every time you want to change the sizing. So you add parameters to your JSP-file and simply pass them at the startup of the application.
The second part is a little bit tricky. Here you have two options. First you could start the webstart from a prestart form with a webutil_host command and remember the process-ID:
v_command := ‘powershell $pclass = [wmiclass]”root\cimv2:Win32_Process”; $pclass.Create(”C:\Progra~2\Java\jre1.8.0_40\bin\javaws.exe -wait http://vmdaka:9001/webstart_11g/pitss.jsp”, ”.”, $null).ProcessId 2>&1;”exit”’;
v_prozess_id := webutil_host.NonBlocking(v_command);
So here I used powershell, to write the process information into stderr. With following commandI am able to load the stderr into Oracle Forms:
So now we can implement a KEY-EXIT Trigger a webutil_host command with a kill command and the corresponding process ID.
Another possible and in my opinion smarter solution is the use of a JavaBean, with which we can get the process id from the applet itself. For that you have to create your own Java Bean that inherits the frmall.jar. Please find a tutorial how you can create your own Java Bean for Forms here
Once you created your bean, you can use following code to determine the process id of your webstart session to be able to kill the process correctly:
RuntimeMXBean runtimeMXBean = ManagementFactory.getRuntimeMXBean();
With this id you can also kill the jp2launcher.exe on the client side – you have to implement the Bean in your Forms and add the invokation of the bean to receive the Applet process ID. So you can use the POST-FORM-TRIGGER with a webutil-command to shut down the process completly.
If you need assistance feel free to have a look here or to leave a comment under this article.