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.
My question is; how do i attach the source? Where do i get the source .jar from for the java.util.concurrent library?
You need to have the JDK installed. Then you can look in
JDK_INSTALL_DIR\src.zipFor 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.