final File lib = new File(temp.getAbsolutePath() + File.separator + "lib");
if (!lib.isDirectory()) {
lib.mkdir();
}
JarFileWriter jarFileWriter = new JarFileWriter();
jarFileWriter.writeJarFile(lib, name + ".jar", new File(temp.getAbsolutePath() + File.separator + "classes"));
Project project = codegenBean.getActiveProject();
final LibraryTable table = (LibraryTable) project.getComponent(LibraryTable.class);
ApplicationManager.getApplication().runWriteAction(new