Here you can find the source of convertToAbsPath(URI baseURI, String path)
public static String convertToAbsPath(URI baseURI, String path) throws Exception
//package com.java2s; //License from project: Apache License import java.io.File; import java.net.URI; public class Main { public static String convertToAbsPath(URI baseURI, String path) throws Exception { // if path is either null or empty, we return it // because nothing to convert if (path == null || path.isEmpty()) { return path; }/* w w w . ja v a2 s . c o m*/ File absFile = new File(baseURI.resolve(path)); return absFile.getCanonicalPath(); } }