JpsLibrary (String name, String jarPath) { final JpsLibrary library = myProject.getLibraryCollection().addLibrary(name, JpsJavaLibraryType.INSTANCE); library.addRoot(JpsPathUtil.pathToUrl(jarPath), JpsOrderRootType.COMPILED); return library; }