public static URL toURL(String str) { try { if (!Path.uriSchemeSpecified(str)) { Path cur = currentPath(); Path path = cur.resolve(str); if (path.isAbsolute()) return path.toURL(); str = path.toString(); } return new URL(str); } catch (Throwable ex) { throw WrappedException.wrapIfNeeded(ex); } }
public Path resolve(Path relative) { if (relative.isAbsolute()) return relative; return resolve(relative.toString()); }