In Eclipse, when you press Ctrl button and click on any  Class names, the IDE will take you to the source file for that class.  This is the normal behavior for the classes you have in your project.

But, in case you want the same behavior for Java’s core classes too,  you can have it by attaching the Java source with the Eclipse IDE. Once  you attach the source, thereafter when you Ctrl+Click any Java class names (String for example), Eclipse will open the source code of that class.

To attach the Java source code with Eclipse,

  1. When you install the JDK, you must have selected the option to install the Java source files too. This will copy the src.zip file in the installation directory.
  2. In Eclipse, go to Window -> Preferences -> Java -> Installed JREs -> Add and choose the JDK you have in your system.
  3. Eclipse will now list the JARs found in the dialog box. There, select the rt.jar and choose Source Attachment. By default, this will be pointing to the correct src.zip. If not, choose the src.zip file which you have in your java installation directory.
  4. Similarly, if you have the javadoc downloaded in your machine, you can configure that too in this dialog box实际上就是将src.jar 这个包附加

How attach Java source(为eclipseIDE附加资源)的更多相关文章

  1. Java Source Attacher 1.2 发布

    Java Source Attacher 1.2 是一款自动帮你附加源代码的Eclipse插件,相信很多Java Coder都有过手动附加源代码的经历,去网上搜索,然后下载下来,最后附加上,很麻烦,而 ...

  2. A Free , Fast and Small Automatic Formatter for C , C++ , C# , Java Source Codes

    A Free , Fast and Small Automatic Formatterfor C , C++ , C# , Java Source Codes Indenting source cod ...

  3. Oracle使用java source调用外部程序

    需求 Oracle调用第三方外部程序.Oracle使用sqluldr2快速导出大批量数据,然后用winrar压缩后发送邮件. 本文档主要实现前两步需求,发送邮件程序这里不再说明. 原码 授权 begi ...

  4. Java程序员开发参考资源

    构建 这里搜集了用来构建应用程序的工具. Apache Maven:Maven使用声明进行构建并进行依赖管理,偏向于使用约定而不是配置进行构建.Maven优于Apache Ant.后者采用了一种过程化 ...

  5. java:找出占用CPU资源最多的那个线程(HOW TO)

    在这里对linux下.sun(oracle) JDK的线程资源占用问题的查找步骤做一个小结:linux环境下,当发现java进程占用CPU资源很高,且又要想更进一步查出哪一个java线程占用了CPU资 ...

  6. java批量爬去电影资源

    摘要 网上有很多个人站来分享电影资源,其实有时候我们自己也想做这个一个电影站来分享资源.但是这个时候就有一个问题,电影的资源应该从哪里来呢?难道要自己一条条手动去从网络上获取,这样无疑是缓慢而又效率低 ...

  7. java:找出占用CPU资源最多的那个线程

    linux环境下,当发现java进程占用CPU资源很高,且又要想更进一步查出哪一个java线程占用了CPU资源时,按照以下步骤进行查找: 1.先用top命令找出占用资源厉害的java进程id,如: 2 ...

  8. Artistic Style 3.1 A Free, Fast, and Small Automatic Formatter for C, C++, C++/CLI, Objective‑C, C#, and Java Source Code

    Artistic Style - Index http://astyle.sourceforge.net/ Artistic Style 3.1 A Free, Fast, and Small Aut ...

  9. java批量爬取电影资源

    摘要 网上有很多个人站来分享电影资源,其实有时候我们自己也想做这个一个电影站来分享资源.但是这个时候就有一个问题,电影的资源应该从哪里来呢?难道要自己一条条手动去从网络上获取,这样无疑是缓慢而又效率低 ...

随机推荐

  1. 【UVA】12504 Updating a Dictionary(STL)

    题目 题目     分析 第一次用stringstream,真TMD的好用     代码 #include <bits/stdc++.h> using namespace std; int ...

  2. OD 实验(十九) - 对多态和变形程序的逆向

    程序: 这个窗口显示这是一个需要去除的 Nag 窗口 点击“确定” 用 PEiD 看一下 这是一个用汇编语言写的程序 逆向: 用 OD 载入程序 Nag 窗口的标题和文本 右键 -> 查找 -& ...

  3. Python Twisted系列教程19:改变之前的想法

    作者:dave@http://krondo.com/i-thought-i-wanted-it-but-i-changed-my-mind/  译者: Cheng Luo 你可以从”第一部分 Twis ...

  4. CentOS7.6安装mailx

    由于ECS服务器安全问题,发送邮件统一使用SSL模式 安装开始: 第一步:Yum安装mailx:yum install -y mailx 第二步: 创建证书存放目录(如以存在无需创建):mkdir - ...

  5. Centos内核参数

    内核参数 abi.vsyscall32 = 1  在2.6.25版本以后的x86-64内核中,默认启用了VDSO32. 虚拟动态共享对象 http://man7.org/linux/man-pages ...

  6. Octave中调用hist出现broken pipe some output may be lost octave的解决(Mac)

    参考:http://octave.1599824.n4.nabble.com/Mac-OS-X-Mountain-Lion-Octave-can-not-execute-sombrero-td4643 ...

  7. ZooKeeper架构

    ZooKeeper服务器端运行于两种模式下:独立模式(standalone)和仲裁模式(quorum).独立模式几乎与其术语所描述的一样:有一个单独的服务器,ZooKeeper状态无法复制.在仲裁模式 ...

  8. openLayers 3 之入门

    openLayers 3 之入门 openlayer是web GIS客户端开发提供的javascript类库,也是开源框架,可以加载本地数据进行展示地图 1.下载相关引用的js.css文件 2.类似于 ...

  9. RHCE7-学习里程 root 密码重置换

    一.root 密码重置换 当忘记root 密码后,可以按照以下方法重置 root 密码 1.重启动电脑,出现如下界面,按  上  下 键盘, 选择   (core)--再按e 2.在下图linux16 ...

  10. Spring oxm入门实例

    O/XMapper是什么? Spring3.0的一个新特性是O/XMapper.O/X映射器这个概念并不新鲜,O代表Object,X代表XML.它的目的是在Java对象(几乎总是一个plainoldJ ...