We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
public static File toFile(URL url) { logger.info("*********url:"+url.getFile()+""+url.getProtocol());
if (url == null || !url.getProtocol().equals("file")) { return null; } else { String filename = url.getFile().replace('/', File.separatorChar); int pos = 0; while ((pos = filename.indexOf('%', pos)) >= 0) { if (pos + 2 < filename.length()) { String hexStr = filename.substring(pos + 1, pos + 3); char ch = (char) Integer.parseInt(hexStr, 16); filename = filename.substring(0, pos) + ch + filename.substring(pos + 3); } } return new File(filename); } }
打成jar后,url.getProtocol()=“jar”,然后报错,应该怎么解决呢
The text was updated successfully, but these errors were encountered:
首先确认问题点 一、如果是读取到配置文件中的信息为null,原因可能有以下几种
Sorry, something went wrong.
No branches or pull requests
public static File toFile(URL url) {
logger.info("*********url:"+url.getFile()+""+url.getProtocol());
打成jar后,url.getProtocol()=“jar”,然后报错,应该怎么解决呢
The text was updated successfully, but these errors were encountered: