admin管理员组

文章数量:1638801

Eclipse中在rt.jar包中打断点,Debug时报错:

Unable to install breakpoint in java.util.regex.Matcher due to missing line number attributes. Modify compiler options to generate line number attributes.
Reason:
Absent Line Number Information

并且发现下面这段代码调试时(第五行),按F5快捷键与F6是一样的效果,并不能跳入Matcher类中

String str = "abcsdfabcsddfabc";
String regex = "abc";
Pattern p = Patternpile(regex);
Matcher m = p.matcher(str);
m.find();
m.group();

原因:

当前工程build path的jre的包不是JDK的jar包,需要做如下修改:

windows -> preferences -> java -> Installed JREs

进入工程目录:


 

点击Finish,问题解决

 

本文标签: 断点报错解决办法EclipseAbsent