code: public static String getClassPath(Class<?> c) {
  		String strClassFullName = c.getName();
  		String strClassName = strClassFullName.substring(strClassFullName
  				.lastIndexOf(".") + 1);
  		String strClassPathName = getClassPathName(c);
  
  		ClassLoader cl = c.getClassLoader();
  		if (cl == null) {
  			cl = ClassLoader.getSystemClassLoader();
  			return null;
  		}
  
  		URL urlClass = cl.getResource(strClassPathName);
  		if (urlClass == null)
  			return null;
  
  		String strUrl = urlClass.toString();
  		return strUrl.substring(0, strUrl.lastIndexOf(strClassName));
  	}
docs: 返回指定类的文件所在的路径。返回的字符串以/结尾