Here you can find the source of getSourcesPath()
public static String getSourcesPath() throws UnsupportedEncodingException
//package com.java2s; //License from project: Apache License import java.io.UnsupportedEncodingException; import java.net.URLDecoder; public class Main { public static String getSourcesPath() throws UnsupportedEncodingException { return URLDecoder.decode(ClassLoader.getSystemResource("").getFile(), "utf-8"); }//from w w w . j ava 2 s.co m }