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) and 12c 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). According to Oracle Support note 1926764.1, Oracle has not enabled JRE 8 for auto-download, so these steps are currently the only possible way to auto-download JRE 8. The steps below were done using Oracle WebLogic Server 10.3.6 and Oracle Forms 11.1.2.2.0 (the same can be done for Oracle WebLogic Server 12.2.1.x and Oracle Forms 12.2.1.x):
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:\PITSS\Java8Download
3. Navigate to %DOMAIN_HOME%\deploymentplans\formsapp\11.1.2 and make a backup of plan.xml (NOTE: In 12c, plan.xml is moved to %DOMAIN_HOME%\config\fmwconfig\deployment-plans\formsapp\12.2.1)
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>
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>
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.
10. In the Deployments page, place a check mark next to “formsapp (11.1.2)” and click “Update”.
11. Click the radio button next to “Update this application in place…” and click “Finish”.
12. In the top-left corner, click “Activate Changes” to publish the changes.
13. After the changes are activated, open up your formsweb.cfg file (located in %DOMAIN_HOME%\config\fmwconfig\servers\WLS_FORMS\applications\formsapp_11.1.2\config)
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
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