How to configure Firefox on Linux to run Oracle Forms Applications
How to configure Firefox on Linux to run Oracle Forms Applications
Titleimage
Posted by Patrick Hamou on 2016:04:07 22:49:48
Introduction
When developing under Linux, in order to run a Forms application in debug mode, a few platform specific configurations needs to be in place. Unlike Windows platform, Firefox is the default Internet browser installed on most Linux distributions.
Also, with the need of a Java Virtual machine started by the browser, a few configuration and setup steps are needed.
Article Objectives
This article's objective is to provide a step-by-step procedure to run and configure the Firefox browser on an Oracle Weblogic Server running on Oracle Linux 6.7 OS and using Java version 1.7.80 via Forms Builder.
Step by step procedure
Step 1 – Firefox browser Configuration
When started, an Oracle Forms 11g application requires a browser that can launch a java virtual machine. When the Linux distribution is installed, Firefox has no plugin to run Java. It has to be configured. Unlike Oracle Forms 12c, Oracle Forms 11g uses a browser that launches a Java Virtual Machine (JVM) to run the application. The JVM is included in the Java Runtime Environment (JRE), as shown below:
If you use Firefox on a Linux distribution, the first step is to configure the Java plugin. First, create a link to the JRE library in the Firefox plugins directory that contains the virtual machine to run the browser. The following script “firefox_config.sh” can perform this task.
#!/bin/sh
#
# Make a link to the Java plugin’s configuration for Firefox
#
#
if [ "$ORACLE_HOME" == "" ] ; then
echo $ORACLE_HOME
echo "ERROR : Environment variable ORACLE_HOME not set properly."
exit -1
fi
if ! [ -f $ORACLE_HOME/jdk/jre/lib/amd64/libnpjp2.so ] ; then
echo "ERROR : Java Environment not found."
exit -2
fi
cd $HOME/.mozilla/plugins
# Delete previous installations
rm -f libnpjp2.so
ln -s $ORACLE_HOME/jdk/jre/lib/amd64/libnpjp2.so .
cd $HOME
echo "Installation of Java’s Plugin for Firefox successfully terminated."
# Check if Firefox is running properly
if ! [ "$(pgrep firefox)" == "" ] ; then
echo "Firefox is running..."
echo "To test the plugin, please close then restart Firefox."
fi
To check if the plugin is running, start a new blank page on the browser and type:
about:plugins
You should get the following screen:
Step 2 – Weblogic Server configuration
The Oracle Weblogic Application Server checks the Java version of the installed plugin in the browser. If it’s not 1.6.0.35 version, the browser will ask to download the version of the plugin. When installing Forms on our machine, current plugin versions are over 1.6.0.35.
The Oracle Weblogic application will check the Java version installed on Firefox. If it’s not at least 1.6.0.35, Firefox will require the latest version of Java.
To facilitate this process, you can use a script such as:
#!/bin/sh
#
# This script removes the control on the Java plugin if enabled to run Oracle Forms 11g
#
config_wls_forms=/$MW_HOME/user_projects/domains/ClassicDomain/config/fmwconfig/servers/WLS_FORMS/applications/formsapp_11.1.2/config/formsweb.cfg
# Checking environment variable MW_HOME
if [ "$MW_HOME" == "" ] ; then
echo "ERROR : Environment variable MW_HOME not set properly."
exit -1
fi
# Checking configuration file
if ! [ -f $config_wls_forms ] ; then
echo "ERROR : File formsweb.cfg not found."
exit -2
fi
# Remove the Java plugin check on the server WLS_FORMS
ctrl_mis=$(cat $config_wls_forms | grep -v -E '^#' | grep -c jpi-version)
if [ $ctrl_mis -gt 0 ] ; then
echo "JRE version check is enabled. Disabling..."
sed -i -e "s/;jpi-version=1.6.0_12//g" $config_wls_forms
chown oracle:oinstall $config_wls_forms
else
echo "JRE version check is disabled."
fi
Step 3 – Activate Java in Firefox and test
Open a new Firefox page and test with the following link:
www.yourservername:9001/forms/frmservlet?config=webutil
You should get the following screen:
The message “This plugin is vulnerable and should be updated” don’t indicate a problem but simply means we need to activate the plugin. To do so, just click the “Activate Java” link. A popup message is displayed as shown below. Click “Allow and Remember” to keep Firefox using this permanently.
Finally, the Java security popup will request your confirmation to access the application. If you want to avoid this popup next time you open the application, tick the “Always trust content from this published” box before hitting the “Run” button.
Congratulations, the Oracle Forms 11g application is running on Firefox as excepted !
Posted by Patrick Hamou on 2016:04:07 22:49:48