top of page

Linh Phan Group

Public·221 members
Anthony May
Anthony May

How to Convert Oracle Forms to Oracle Application Express Using Forms2XML Utility

How to Convert Oracle Forms to Oracle Application Express Using Forms2XML Utility

If you have an existing Oracle Forms application and you want to migrate it to Oracle Application Express, you need to follow a series of steps that involve converting your Forms modules to XML files, creating a workspace and users, uploading database objects, creating a conversion project, reviewing and editing forms metadata, and generating the Application Express application. In this article, we will focus on the first step: how to use the Forms2XML utility to convert your FormModules, ObjectLibraries, or MenuModules to XML files.

The Forms2XML utility is a tool that was introduced in Oracle9i Developer Suite and is also available in Oracle Developer Suite 10g. It can convert Oracle Forms FormModule, MenuModule, and ObjectLibrary files to Extensible Markup Language (XML) files that can be consumed by the Create Migration Project wizard in Oracle Application Express. The utility can also work on files from earlier releases of Oracle Forms, but if it does not work for a specific file, you may need to upgrade it to Oracle Developer Suite 9i or 10g first.


Using the Forms2XML Utility from a Command Line

The simplest way to use the Forms2XML utility is from a command line. You need to have the Oracle Developer Suite installed on your machine and set the environment variables ORACLE_HOME and PATH accordingly. Then, you can run the following command:

forms2xml source_file destination_directory

where source_file is the name of the Forms file you want to convert and destination_directory is the name of the directory where you want to save the XML file. For example:

forms2xml emp.fmb c:\temp

This command will convert the emp.fmb file to an XML file named emp_fmb.xml and save it in the c:\temp directory. The utility will add an extension _fmb, _mmb, or _olb to the base file name to indicate whether the original file was a FormModule, a MenuModule, or an ObjectLibrary.

Using the Forms2XML Utility in a Java Program

If you want more control over the conversion process, you can use the Forms2XML utility in a Java program. You need to have the Java Development Kit (JDK) installed on your machine and include the forms2xml.jar file in your classpath. Then, you can use the following code snippet:

import oracle.forms.util.xmltools.Forms2XML;

import oracle.forms.util.xmltools.Forms2XMLException;

public class ConvertForms

public static void main(String[] args)


// create an instance of Forms2XML

Forms2XML f2x = new Forms2XML();

// set the source file name


// set the destination directory name


// set the overwrite option


// convert the file


catch (Forms2XMLException e)

// handle exception


This code will do the same thing as the previous command line example, but with some additional options. You can set the overwrite option to true or false depending on whether you want to overwrite an existing XML file with the same name. You can also catch and handle any exceptions that may occur during the conversion process.


In this article, we have learned how to use the Forms2XML utility to convert Oracle Forms files to XML files that can be used for migrating applications to Oracle Application Express. This is only the first step of the conversion process, and there are more steps involved before you can generate and run your Application Express application. For more information on how to complete the conversion process, you can refer to Converting an Oracle Forms Application. 0efd9a6b88


Welcome to the group! You can connect with other members, ge...


  • Linh Phan
  • Goyo Dinielli
    Goyo Dinielli
  • Artem Shapoval
    Artem Shapoval
  • Hermiane Cielle
    Hermiane Cielle
  • Amber Foster
    Amber Foster
bottom of page