Java eclipse中无法查看源代码
来源:互联网 发布:顺丰打单软件 编辑:程序博客网 时间:2024/06/09 16:59
Java eclipse中查看(ctrl+shift+t)源代码提示 not found
一、你是第一次使用该功能,没有导入项目源码,故无法查看源码
解决方法:
1.点 “window“-> “Preferences”-> “Java” -> “Installed JRES”;
2.此时"Installed JRES"右边是列表窗格,列出了系统中的JRE 环境,选择你的JRE,然后点边上的“Edit...“, 会出现一个窗口(Edit JRE) ;
3.选中rt.jar文件的这一项:“C:\Java\jdk1.5.0_04\jre\lib\rt.jar” 点 左边的“+”号展开它(JDK实际安装路径以你的为准);
4.展开后,可以看到“Source Attachment:(none)”,点这一项,点右边的按钮“Source Attachment...“,选择你的JDK目录下的 “src.zip”文件;
5.一路点“ok”结束。
二、之前可以通过ctrl + shift + t找对应的类,但是后来无法通过ctrl + shift + t找对应的类,并且类明明存在,并且也在编译路径下,但就是查找不到,一个可能的原因就是eclipse为类建立的索引出了问题。
解决的方法是:找到项目所在工作空间下的.metadata/.plugins/org.eclipse.jdt.core文件夹,将里面的*.index文件和savedIndexNames.txt文件删除,重启eclipse,然后eclipse会重建索引,这时问题就可以解决了。
解决方法来自这里:
http://www.java-forums.org/eclipse/6513-open-type-ctrl-shift-t-does-not-find-types.html
Sometimes, the indexes that Eclipse use for searching the types, get corrupted. You can clear the Open Type indexes by going to /.metadata/.plugins/org.eclipse.jdt.core and deleting all files there. The indexes will be re-built the next time you use open type.Note that this is a empirical observation, and you may delete some JDT saved data that you don't want to delete. I observed no ill effects, but for safety you could try deleting just the *.index files and the "savedIndexNames.txt", and see if it works.
- Java eclipse中无法查看源代码
- Java eclipse中无法查看源代码
- 在eclipse中查看java的源代码
- eclipse中查看java包的源代码
- Eclipse中查看源代码
- eclipse中查看源代码
- eclipse查看java源代码
- Eclipse查看Java源代码
- Eclipse中无法查看Java源码,解决方法
- 解决Eclipse中无法查看Java源码
- Eclipse中查看Android源代码
- Eclipse中查看Android源代码
- Eclipse中查看Android源代码
- eclipse中查看Android源代码
- eclipse中查看JDK源代码
- eclipse如何查看Java源代码
- eclipse实现Java源代码查看
- Eclipse中如何查看Java自带函数的源代码?
- 将整数n这个数字转换为对应的字符串
- 将整数n转换为以b进制的数
- 《时代三部曲》感悟三
- yii框架登录令牌
- 将数组"student a am i"改为"i am a student".
- Java eclipse中无法查看源代码
- 统计字符串中:各个数字、空白字符、以及其他所有字符出现的次数
- HDOJ 5818 Joint Stacks(栈)
- HDOJ 1213 How Many Tables(并查集)
- 判断一个字符串是否为另外一个字符串左旋或右旋之后的字符串
- POJ 2488 A Knight's Journey
- 【面试】嵌入式软件与非嵌入式软件、设备驱动与裸机驱动开发区别
- 编写一个函数,可以左旋字符串中k个字符
- 在字符串中找出第一个只出现一次的字符