Here you can find the source of getClassPathPath()
public static String getClassPathPath() throws Exception
//package com.java2s; import java.io.File; import java.io.UnsupportedEncodingException; import java.net.URLDecoder; public class Main { private static final String ENCODE = "GBK"; private static String webRoot = ""; public static String getClassPathPath() throws Exception { String path = webRoot + "WEB-INF" + File.separator + "classes"; path = urlDecoder(path);/*www.jav a2s . co m*/ return path; } private static String urlDecoder(String path) throws UnsupportedEncodingException { path = URLDecoder.decode(path, ENCODE); return path; } }