查看源码出现Source not found:The JAR file E:\project\mybatis\lib\mybatis-3.4.2.jar has no source attachmen

问题描述

本人在使用Eclipse练习一个MyBatis项目时,想要查看一个方法的源码,结果出现
查看源码出现Source not found:The JAR file E:\project\mybatis\lib\mybatis-3.4.2.jar has no source attachmen

分析原因:缺少MyBatis源码

  1. 看提示信息,“The JAR file E:\project\mybatis\lib\mybatis-3.4.2.jar has no source attachment.”缺少源码,本人缺的是MyBatis源码,那么就去找MyBatis源码。
    查看源码出现Source not found:The JAR file E:\project\mybatis\lib\mybatis-3.4.2.jar has no source attachmen
  1. 找一下自己的mybatis源码在哪,找到之后点击下面的 Attach Source出现
    查看源码出现Source not found:The JAR file E:\project\mybatis\lib\mybatis-3.4.2.jar has no source attachmen
    找到放源码的目录,
    查看源码出现Source not found:The JAR file E:\project\mybatis\lib\mybatis-3.4.2.jar has no source attachmen
    查看源码出现Source not found:The JAR file E:\project\mybatis\lib\mybatis-3.4.2.jar has no source attachmen
    此时,Source not found窗口消失,源码出来了。
    查看源码出现Source not found:The JAR file E:\project\mybatis\lib\mybatis-3.4.2.jar has no source attachmen

怎么让Source not found 重新出现?

当你把这个问题解决之后,想写个博客记录一下,却发现回不去了,不知怎么才能让Source not found那个框框再次出现,
方法:选择当前项目,右键=》Build Path=》Configure Build Path=》
查看源码出现Source not found:The JAR file E:\project\mybatis\lib\mybatis-3.4.2.jar has no source attachmen
查看源码出现Source not found:The JAR file E:\project\mybatis\lib\mybatis-3.4.2.jar has no source attachmen
此时又出现了Source not found框框,开心!
查看源码出现Source not found:The JAR file E:\project\mybatis\lib\mybatis-3.4.2.jar has no source attachmen