java中找不到某个类

问题:用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。

猜你喜欢

转载自blog.csdn.net/c472769019/article/details/78444068