在工程上点击右键,选择属性,进入java build path->libraries, 在需要管理的jar包左边点击小箭头展开,在source attachment 上点击即可选择 source 包建立关联。 见下图: