Here you can find the source of getRootPath()
public static String getRootPath()
//package com.java2s; //License from project: Apache License import java.io.File; public class Main { public static String getRootPath() { File file = new File(System.getProperty("user.dir")); String path = file.getAbsolutePath().replace('\\', '/'); path = path.substring(0, path.indexOf('/')); return path; }// w w w. j a v a2 s .co m }