Java Webstart with Forms – jp2lauchner.exe workaround

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 ( 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 UnbenanntFormsapplication 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.


3 thoughts on “Java Webstart with Forms – jp2lauchner.exe workaround

  1. Do you have any example code for the second solution posted above (JavaBean and POST_FORM_TRIGGER)? I realize it is a while since you wrote the blog, but it is something that we are interested in implementing. I would appreciate any help you can offer.

    Chris Campion


  2. Hi Chris,
    You’re right, its been a while since the post. In the Bean you have to define an ID for the method that you want to use, something like:

    protected static final ID pGetAppletID = ID.registerProperty(“GET_APPLET_ID”);

    Then you can create a method in which you evaluate the given ID and execute the code from the post:
    public Object get_property(ID property){
    //insert code here

    You can then return the Applet ID.

    In the form you can use the get_custom_property to receive the applet ID in the Forms Application. I think there are a lot of examples in the web 🙂

    I hope that helps you.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s