Here you can find the source of getBaseURI()
public static URI getBaseURI()
//package com.java2s; // are made available under the terms of the Eclipse Public License v1.0 import java.io.File; import java.net.URI; public class Main { private static File basedir; private static URI baseURI; public static URI getBaseURI() { if (baseURI == null) { getBasedir();/*ww w. java 2s .c o m*/ } return baseURI; } public static File getBasedir() { if (basedir == null) { String cwd = System.getProperty("basedir"); if (cwd == null) { // System property not set. // Use CWD. cwd = System.getProperty("user.dir"); basedir = new File(cwd); // Set the System property. System.setProperty("basedir", basedir.getAbsolutePath()); } else { // Has system property, use it. basedir = new File(cwd); } baseURI = basedir.toURI(); } return basedir; } }