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. asterisk配置SIP服务器

    服务器asterisk我们安装完以后,需要在windows(就是自己的本机)上在安装一个客户端xlite,直接下载安装就行,安装完以后,我们就需要自己手动配置一下sip服务器了. 下面给大家讲一下怎么 ...

  2. 【POJ】2373 Dividing the Path(单调队列优化dp)

    题目 传送门:QWQ 分析 听说是水题,但还是没想出来. $ dp[i] $为$ [1,i] $的需要的喷头数量. 那么$ dp[i]=min(dp[j])+1 $其中$ j<i $ 这是个$ ...

  3. Less、Sass/Scss

    一.Less.Sass/Scss是什么? 1.Less: 是一种动态样式语言. 对CSS赋予了动态语言的特性,如变量.继承.运算.函数. Less 既可以在客户端上运行 (支持IE 6+, Webki ...

  4. sql server 2008 链接到数据库引擎

  5. spring 声明式事务的坑 @Transactional 注解

    1.首先环境搭建,jar 我就不写了,什么一些spring-core.jar spring-beans.jar spring-content.jar 等等一些包 省略..... 直接上图: sprin ...

  6. Win8电源选项中没有休眠这一项如何让Win8也能够休眠

    我们都知道,Win8默认的电源选项中是没有休眠这一选项的,即使用Alt+F4打开关闭Windows选项窗口也看不到”休眠“.难道Win8就不能够休眠了吗?答案当然不是,我们只要进行一些设置就能让Win ...

  7. Spring源码研究--下载-编译-导入eclipse-验证

    一,环境配置 操作系统:Unbutu14.04LTS JDK: 1.8.0_40 git: 1.9.1 gradle: 2.2.1 二,源码下载-编译-导入eclipse-验证 1,下载 使用git直 ...

  8. NIO编程介绍

    代码: package bhz.nio; import java.io.IOException; import java.net.InetSocketAddress; import java.nio. ...

  9. Arduino学习笔记A6(补充) - 在串口读取多个字符串,并且转换为数字数组

    功能如题目. 在串口收到逗号分割的6串数字比如 100,200,45,4,87,99 然后在6个PWM端口3, 5, 6, 9, 10, 11输出对应PWM值 代码注释很详细了,就不再说明了. ARD ...

  10. ActionMQ5.8.0 JMS实例 手把手详细图解

    出自:http://blog.csdn.net/tongjie008/article/details/40687087 ActionMQ 是开源的JMS实现 1.下载ActiveMQ 去官方网站下载: ...