try {
BasicConfigurator.configure(); // initialize log4j for string analyzer
Logger.getRootLogger().setLevel(Level.ERROR);
String classpath = System.getProperty("soot-classpath");
StandardConfiguration config = new StandardConfiguration();
if (classpath == null)
classpath = "";
List<String> classes = new ArrayList<String>();
for (String arg : args) {
if (arg.startsWith("-dir=")) {
String dir = arg.substring("-dir=".length());
addClassFilesFromFolder(new File(dir), "", classes);
classpath += File.separator + dir;
}
else if (arg.startsWith("-basedir=")) {
config.setBasedir(arg.substring("-basedir=".length()));
}
else if (arg.startsWith("-cp=")) {
String cparg = arg.substring("-cp=".length());
classpath += File.separator + cparg;
}