PropertiesFileEnvironmentFactoryBean environmentFactory = new PropertiesFileEnvironmentFactoryBean(environmentTemplate);
environmentFactory.setEnvironmentFile(new DefaultResource(environmentFileLocation));
Environment environment = environmentFactory.createEnvironment();
interperter.setEnvironment(environment);
XmlCommandsReader commandsReader = new XmlCommandsReader();
commandsReader.setClassLoader(classLoader);
commandsReader.setXmlFile(new DefaultResource(commandsFileLocation));
CommandsTemplate groups = commandsReader.readObject();
interperter.setCommandsTemplate(groups);
return interperter;
}