windows--preferences-- Java --installed jres --选中jre1.8--点击右边的edit--选中jre1.8/lib/rt.jar --点击右边的 source attachment configuration -- external file selection --找到你的jdk下的src.zip文件,选择,然后就结束了