Thanks Thomas,
I was able to run the application in headless mode accessing the args with the following way,
Map<String, Object> contextArguments = arg0.getArguments();
String [] cmdArgs = (String[]) contextArguments.get(IApplicationContext.APPLICATION_ARGS);
But now I'm getting an exception logged on starting the application,
[1] java.lang.RuntimeException: Unable to aquire PluginConverter service during generation for: /home/awanthika/WSO2/DeveloperStudio/mars/eclipse-mars/eclipse/plugins/org.wso2.developerstudio.eclipse.test.p2.hierarchy_4.2.0.201605191638.jar
at org.eclipse.equinox.internal.frameworkadmin.utils.Utils.convertPluginManifest(Utils.java:154)
at org.eclipse.equinox.internal.frameworkadmin.utils.Utils.basicLoadManifest(Utils.java:82)
at org.eclipse.equinox.internal.frameworkadmin.utils.Utils.getOSGiManifest(Utils.java:217)
at org.eclipse.equinox.internal.frameworkadmin.equinox.EquinoxBundlesState.installBundle(EquinoxBundlesState.java:556)
at org.eclipse.equinox.internal.simpleconfigurator.manipulator.SimpleConfiguratorManipulatorImpl.updateBundles(SimpleConfiguratorManipulatorImpl.java:560)
Regards
Awanthika