Wednesday, March 13, 2013

Tip to ease Deployment on Linux of an Oracle Forms developed on Windows

You are using Windows on your desktop to run Oracle Forms Builder 10g or + to develop or maintain Oracle Forms applications.
Your Forms server is setup on a Linux machine, in my case Oracle Linux 5 64bit running Oracle Forms

Each time a Forms is recompliled following a modification, you need to recompile the binary fmb file using on Linux to produce the fmx before being able to access the new form from the Forms server.

This step can be annoying because you have to first transfer the fmb file to the Linux server, than log in to the Linux server via telnet, ssh or some other remote control utility and run the frmcmp script.

To speed the process, I have done the following :-
1/. Setup openssh on my windows desktop where Forms builder is installed (You can download here)
2/. Map the folder where the fmx are located on the Forms server (as per the FORMS_PATH parameter). In my case, the location is on a Netapp filer and that location is mounted via NFS on the Forms server and via CIFS on my Windows development machine.
3/. Add a file context menu for all fmb file in Windows to run a .bat script that executes an ssh command on the linux server to run frmcmp taking in parameter the filename selected in Windows.

To achieve this, you can refer to this "How to" article .
The BAT script is as simple as this :-

ssh "/Oracle/Middleware/asinst_1/bin/ Module=/WEBFRM/%~nx1 Userid=mydblogin/mydbpassword@mydb Module_type=FORM Logon=YES Compile_All=YES"
PAUSE is <Linux user>@<the FQN of the Forms server>.
/Oracle/Middleware/asinst_1/bin/ is the path for the script.
/WEBFRM/ is the path as mounted on the Forms server for the fmb files.

To make sure works, you can set the environment directly at the beginning of the file (make a backup of the orginal file before editing) as follow:-

export DISPLAY
#the rest is similar to the oracle account environment you usually set in the oracle profile in /home/oracle
JAVA_HOME=<your JDK path where bin is located>
export JAVA_HOME
ORACLE_INSTANCE=<your Middleware instance path>
ORACLE_HOME=<Your forms home path>
export PATH

With this in place, when an Oracle Form is modified and compiled on Windows, I just have to right-click on the file, choose my custom context menu option which I have called "Compile fmb for Linux"; the fmx is generated after compilation and I just have to copy that fmx to the production/deployment mapped drive.


  1. PLZ, I want to run 10g forms on linux from Windows based application server

  2. how do i open an already converted form in linux, so that it opens in windows