You can or add it programmatically, or just put files under the .idea/runConfigurations directory (the easiest way).
To add programmatically:
RunManagerImpl manager = RunManagerImpl.getInstanceImpl(project)
RunnerAndConfigurationSettingsImpl settings = new RunnerAndConfigurationSettingsImpl(manager);
// data it is something like JDOMUtil.load(file)
settings.readExternal(data)
manager.add(settings, false)