如何在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.
我的问题是我如何附加源?我从哪里获得源代码.jar从 java.util.concurrent
库?
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_DIR\src.zip
You need to have the JDK installed. Then you can look in JDK_INSTALL_DIR\src.zip
对我而言,它是 C :\Program Files\java\jdk1.6.0_11\
(取决于您当前的版本)
For me it is C:\Program Files\java\jdk1.6.0_11\
(depends on your current version)
您不需要获得特殊的开源版本。
You don't need to get a special open source version.
这篇关于如何在Eclipse中查看JRE的源代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!