JpsLibrary (final String libraryName, final File jarFile) { JpsLibrary library = myProject.addLibrary(libraryName, JpsJavaLibraryType.INSTANCE); library.addRoot(jarFile, JpsOrderRootType.COMPILED); return library; }