Purpose: Used to format all the code base from the source directory
Reference Link: http://sourceforge.net/apps/mediawiki/flexformatter/index.php?title=FormatterCommandLine
Setup: Get all the jars

Where will you find the jars:

and also from

Download the jars and create a folder called “ComandLineFormatting”, and dump in all the jars in this folder.
If in case, you do not have java jdk installed on your machine, then please install and check if its working.
How to Check Java is working.
- Open Command Prompt. Type “cmd” in your search and the command window appears for you.
- Type “cd\” then Type java -version. You should see the current java version installed on your system.
If your java is working fine you should see the below screen.

Now Type cd C:\Users\rchouhan\CommandLineFormatting as shown to point to your local folder.

As per the Sourceforge document the instruction is to execute “java -Djava.ext.dirs=. utilities.CommandLine c:\sourceDir c:\tools\Formatter.properties 4 true”.
where -Djava.ext.dirs point to all the external jars in “CommandLineFormatting” folder that you just created.
c:\sourceDir – is the flex project source folder where you have all mxml’s and actionscript (*.as) files located and
c:\tools\Formatter.properties – its the location where you have the FlexFormatter properties file.
In my case it would be

and Hit “Enter”
After successful execution of this command, you should see

Note: If you have any white spaces between folder names and or path , try to give the full path in quotes.
“C:\Users\rchouhan\Adobe Flash Builder 4.6\testComboBox\src“
Your output in the Flash Builder would be a nicely formatted code:

Hope you’ve enjoyed it.!!!