SDKRuntimePlugin runtimePlugin = SDKPluginManager.findRuntimePlugin(
new File(applicationDirectory));
if (runtimePlugin != null) {
try {
ApplicationDirectories appDirs = runtimePlugin.generateApplicationDirectories(
new File(applicationDirectory));
applicationDirectory = appDirs.getWarDir().getPath();
getArgs().set(0, applicationDirectory);
externalResourceDir = appDirs.getExternalResourceDir().getPath();
} catch (IOException e) {
throw new RuntimeException("Unable to generate the war directory", e);
}
}