Oracle Support document 367778.1 provides a great document explaining how auto-downloading a JRE can be done from Oracle Application Server 10g. The same procedure can also be performed for Oracle Forms 11g (and 11gR2) using Oracle WebLogic Server.

In our example, we are attempting to have the client auto-download the latest Java 8 update (1.8.0_45). The steps below were done using Oracle WebLogic Server 10.3.6 and Oracle Forms 11.1.2.2.0 (the only version of Oracle Forms currently supported with JRE 8):

1. Download a 32-bit JRE from Oracle (example for latest Java 8: jre-8u45-windows-i586.exe)

2. Create a folder in your application server and place the JRE in this location. In our example, we created a folder called C:PITSSJava8Download

image2

3. Navigate to %DOMAIN_HOME%deploymentplansformsapp11.1.2 and make a backup of plan.xml

4. Open up plan.xml in a text editor.

5. Inside the file, create a new variable for the directory where the folder containing the JRE is located. You may use our example below as a guide:

<variable>
<name>vd-C:/PITSS</name>
<value>C:/PITSS</value>
</variable>

image_thumb3

6. Further down in the file, create a new variable assignment containing both the directory specified in the variable above and then the xpath or alias containing the name of the folder which has the JRE inside:

<variable-assignment>
<name>vd-C:/PITSS</name>
<xpath>/weblogic-web-app/virtual-directory-mapping/[url-pattern=”Java8Download/*”]/local-path</xpath>
</variable-assignment>

image_thumb4

7. Save and close the file.

8. Log into your WebLogic Administration Console and go to Deployments.

9. Click “Lock & Edit” in the top-left corner.

image_thumb5

10. In the Deployments page, place a check mark next to “formsapp (11.1.2)” and click “Update”.

image_thumb6

11. Click the radio button next to “Update this application in place…” and click “Finish”.

image_thumb7

12. In the top-left corner, click “Activate Changes” to publish the changes.

image_thumb8

13. After the changes are activated, open up your formsweb.cfg file (located in %DOMAIN_HOME%configfmwconfigserversWLS_FORMSapplicationsformsapp_11.1.2config)

14. Locate your jpi_codebase parameter. Replace the current value with the URL. If you need to, also update your other JPI parameters to use Java 8 (as indicated in the screenshot below) .Use the format below:

http://server.domain:8888/forms/AliasName/JRE_file.exe

Example: jpi_codebase=http://server.domain:8888/forms/Java8Download/jre-8u45-windows-i586.exe

image_thumb9

15. Save and close the file.

16. Restart WLS_FORMS.

After completing the steps above, the next time you run your Oracle Forms application (assuming that JRE 8 has not been installed in your machine), you will be prompted to auto-download Java 8.

Source: Oracle Support note 367778.1

Thanks to my colleague Scott for composing this information in our knowledge base:

http://pitss.com/us/2015/05/06/how-to-auto-download-jres-from-application-server-for-forms-11g/