Here you can find the source of getAbsoluteBasePath()
public static String getAbsoluteBasePath()
//package com.java2s; //License from project: LGPL import java.net.URL; public class Main { public static String APPS_JAR_DIRECTORY; private static String absoluteBasePath; public static String getAbsoluteBasePath() { if (absoluteBasePath == null) { if (APPS_JAR_DIRECTORY != null) { absoluteBasePath = APPS_JAR_DIRECTORY; } else { URL url = Thread.currentThread().getContextClassLoader().getResource("schemas/common.xsd"); absoluteBasePath = url.getPath(); absoluteBasePath = absoluteBasePath.substring(0, absoluteBasePath.length() - 18); // remove schemas/common.xsd absoluteBasePath = absoluteBasePath.replace('\\', '/'); }/*from www. j a v a 2 s .com*/ } return absoluteBasePath; } }