Eclipse界面如下:
Eclipse无法查看源代码,显示Source not found,The JAR file xxx has no source attachment
解决方法:

  1. Window---->Preferences
    Eclipse无法查看源代码,显示Source not found,The JAR file xxx has no source attachment
  2. 点击左侧 Java---->Installed JREs,点击右侧 Edit
    Eclipse无法查看源代码,显示Source not found,The JAR file xxx has no source attachment
  3. 点击 rt.jar(我这里是D:\Java\jre1.8.0_191\lib\rt.jar)---->点击下面的Source attachment(none) ---->点击右侧的Source attachment…
    Eclipse无法查看源代码,显示Source not found,The JAR file xxx has no source attachment
  4. 选择External location---->External File
    Eclipse无法查看源代码,显示Source not found,The JAR file xxx has no source attachment
  5. 选择你的JDK目录下的lib下的src.zip,然后一路确定
    Eclipse无法查看源代码,显示Source not found,The JAR file xxx has no source attachment
    最终结果:
    Eclipse无法查看源代码,显示Source not found,The JAR file xxx has no source attachment

相关文章:

  • 2021-09-16
  • 2021-11-26
  • 2022-01-02
  • 2022-01-01
  • 2021-11-10
  • 2021-04-29
猜你喜欢
  • 2022-12-23
  • 2022-01-05
  • 2021-04-06
  • 2021-10-17
  • 2021-12-12
  • 2022-01-17
  • 2021-07-06
相关资源
相似解决方案