//Compile the source to another directory
SrcCompiler srcCompileTool = new SrcCompiler();
srcCompileTool.compileSource(tempClassFile.getPath());
//create the jar file and add that to the lib directory
String projectLib = output.getOutputLocation()+File.separator+"lib";
JarFileWriter jarFileWriter = new JarFileWriter();
String jarFileName = "CodegenResults.jar";
if (!output.getJarFilename().equals("")){
jarFileName=output.getJarFilename();
}
output.setJarFileName(jarFileName);
File tempClass = new File(tempClassFile.getPath()+File.separator+"classes");
jarFileWriter.writeJarFile(new File(projectLib), jarFileName, tempClass);
//Delete the temp folders
deleteDir(tempClassFile );
}