code: public static String getSourcePathForClass(Class clazz, String defaultValue) {
  
  	try {
  
  	    String result = clazz.getProtectionDomain().getCodeSource().getLocation().getPath();
  	    result = URLDecoder.decode(result, CharsetUtil.UTF8.name());
  	    result = SystemUtil.fixWindowsPath(result);
  	    return result;
  	}
  	catch (Throwable t) {
  	    ExceptionUtil.rethrowIfNecessary(t);
  	}
  
  	return defaultValue;
      }
docs: returns the path to the directory or jar file that the class was loaded from
  
  @param clazz - the Class object to check, for a live object pass obj.getClass();
  @param defaultValue - a value to return in case the source could not be determined
  @return