Path (Path xsltDebuggerClassesRoot, String jarFile) { Path transformerFile = xsltDebuggerClassesRoot.getParent().resolve("rt").resolve(jarFile); if (!Files.exists(transformerFile)) { //running from sources Path libDir = getPluginEngineDirInSources().resolve("impl/lib"); transformerFile = libDir.resolve(jarFile); assert Files.exists(transformerFile) : transformerFile.toAbsolutePath().toString(); } return transformerFile; }