refactored SimpleJavaCompiler to handle more than 1 factory class