/**
* 获取工程所在目录
* @return
* @throws UnsupportedEncodingException
*/
private static String getProjectPath() throws UnsupportedEncodingException{
URL url = UpdateHook.class.getProtectionDomain().getCodeSource().getLocation();
String filePath = URLDecoder.decode(url.getPath(), "UTF-8");
if(filePath.endsWith(".jar"))
filePath = filePath.substring(0, filePath.lastIndexOf("/") + 1);
return filePath;
}
* 获取工程所在目录
* @return
* @throws UnsupportedEncodingException
*/
private static String getProjectPath() throws UnsupportedEncodingException{
URL url = UpdateHook.class.getProtectionDomain().getCodeSource().getLocation();
String filePath = URLDecoder.decode(url.getPath(), "UTF-8");
if(filePath.endsWith(".jar"))
filePath = filePath.substring(0, filePath.lastIndexOf("/") + 1);
return filePath;
}
浙公网安备 33010602011771号