Exporting an Apex Application Via Command Line

July 15, 2011 at 2:43 pm | Posted in Oracle Developement | 1 Comment

You can quickly export Apex applications through the command line, avoiding the Apex UI completely. To do this, Oracle has provided two java classes, which are included in the Apex download:

  • APEXExport.class
  • APEXExportSplitter.class

These classes are located in the apex/utilities/oracle/apex directory.

Before using these classes, you have to make sure that the following environment variables are set up correctly:

ORACLE_HOME should point to just that. Something like:


APEX_HOME should point to the directory where you unzipped the Apex download. For example


PATH needs to include $ORACLE_HOME/jdk/bin

CLASSPATH needs to include:

  • $ORACLE_HOME/jdbc/lib/ojdbc5.jar
  • $APEX_HOME/utilities

Note: You may also have to include the . path.


To execute the export use

$ java oracle.apex.APEXExport <list of arguments>

You can get a list of the available arguments by executing the above command without arguments. For a basic application export use:

$ java oracle.apex.APEXExport  -db localhost:1521:db1 -user scott -password tiger -applicationid 100

You’ll get a message saying: Exporting application 100.

Once the export is done you’ll see an *sql file in your current directory (e.g. f100.sql).


You can now take the export file and split it up into its various components. This is handy if, for example, you want to examine the SQL of an application page or two.

$ java oracle.apex.APEXExportSplitter f100.sql

This program creates a directory named after your application (e.g. f100) and multiple sub directories which contain the various components of the application.

Thanks to the Oracle Apex Community for the info.


1 Comment »

RSS feed for comments on this post. TrackBack URI

  1. Excelente Muchas gracias!!!!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Entries and comments feeds.

%d bloggers like this: