如何在 Eclipse 中查看 JRE 的源代码? [英] How do I view JRE's source code in Eclipse?
问题描述
使用 Eclipse 我想查看核心 Java 类的源代码(例如 java.util.concurrent.ConcurrentHashMap
),但是当我使用打开声明"导航到源代码时,它显示源代码"未找到"并让我选择附加来源.
Using Eclipse I want to view the source code for a core Java class (E.g. java.util.concurrent.ConcurrentHashMap
) but when I navigate to the source using 'Open Declaration' it says 'Source not found' and gives me the option to attach the source.
我的问题是;我如何附上来源?我从哪里获得 java.util.concurrent
库的 .jar 源文件?
My question is; how do i attach the source? Where do i get the source .jar from for the java.util.concurrent
library?
推荐答案
您需要安装 JDK.然后你可以在JDK_INSTALL_DIRsrc.zip
You need to have the JDK installed. Then you can look in JDK_INSTALL_DIRsrc.zip
对我来说是 C:Program Filesjavajdk1.6.0_11
(取决于你当前的版本)
For me it is C:Program Filesjavajdk1.6.0_11
(depends on your current version)
您不需要获得特殊的开源版本.
You don't need to get a special open source version.
这篇关于如何在 Eclipse 中查看 JRE 的源代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!