java中找不到某个类

来源:互联网 发布:淘宝菜鸟驿站怎么没了 编辑:程序博客网 时间:2024/06/16 12:38

问题:用Eclipse进行Java编程时,查看类的源代码,按 Ctrl+鼠标 左键,出现The source attachment does not contain the source for the file xxx.class, You can change the source attachment by clicking Change Attached Source below: 

 解决:点 Change Attached Source below 在External location中 设置 External File 路径为jdk目录下的 src.zip。 有些需要设置完了重启Eclipse。

原创粉丝点击