Skip to content
New issue

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

本地调试根目录找不到 #13

Open
lybing opened this issue Jan 12, 2020 · 1 comment
Open

本地调试根目录找不到 #13

lybing opened this issue Jan 12, 2020 · 1 comment

Comments

@lybing
Copy link

lybing commented Jan 12, 2020

在初始化积分日志bean的工具类中,有一段是“把生成的class文件写入文件”,在获取根目录(getRootPath)的代码是:

//windows下
if("\\".equals(File.separator)){   
	rootPath  = classPath.substring(1,classPath.indexOf("/WEB-INF/classes"));
	rootPath = rootPath.replace("/", "\\");
}

我的classPath:D:/My/opensrc/GitHub/bbs/target/classes
所以导致了if里面第一行会报错:String index out of range: -2

@diyhi
Copy link
Owner

diyhi commented Jan 12, 2020

正常的路径是这样 ......\项目\WEB-INF\classes

你这个路径识别不了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants