The JAR file XXX has no source attachment问题(Eclipse)

学习过程中查看源码遇到The JAR file XXX has no source attachment的问题后我的解决办法是下载一个Java Source Attacher这个插件。这个插件自动帮你附加源代码,就不用了手动附加。

一、下载插件

1.下载地址:http://marketplace.eclipse.org/

2.如图

3.如图

二、插件放置

下完插件后,将org.freejava.javasourceattacher_1.2.8.jar放置到Eclipse根目录下的plugins文件下(plugins就是插件的意思)

注意:放完插件后,要将Eclipse重启

三、使用插件

重启Eclipse后找到你想加载源码的jar包右键选择Attach Java Source

四、查看应该加载哪个jar包

使用ctrl+shift+T

如上图,我查找的HttpServlet所在的jar就是servlet-api.jar

五、查看源码

方法1:按住Ctrl键然后点击你要查的类、接口

方法2:选取要查的类、接口,右键后选择Open Declaration或者按F3

根本就是进行Open Declaration操作。

原文地址:https://www.cnblogs.com/foodiedragon/p/11317980.html

时间: 2024-10-18 23:25:01

The JAR file XXX has no source attachment问题(Eclipse)的相关文章

3、eclipse 查看原始类出现The jar file rt.jar has no source attachment解决方法

因为rt的source在jdk目录的src.zip文件里,将文件设置为jdk下的src.zip就行了.具体如下 Window>Preferences>Java>Installed JREs 选上jdk1.6.xxxx,点edit,jre system libraries下面点rt.jar的那一栏,然后选source attachment在弹出的对话框里填写src.zip的路径

debug网页时小问题The source attachment does not contain the source for the file

第一次debug总是出现下图问题,提示我没加源码... The source attachment does not contain the source for the file ... 解决方法:先跳过所有断点,让服务启动成功.再设置断点调试.

The process could not read file xxx due to OS error 53

  在不同地域的两个SQL Server服务器上配置了复制(Replication)用于同步数据(生产环境配置有Replication,测试环境也配有Replication),两地通过专线连接起来,这些复制(Replication)已经稳定运行了一两年了, 但是前阵子,测试环境的SQL Server的Replication中突然遇到下面错误: Error messages: The process could not read file '\\xxx\xxx\xxx\xxx\xxx\xxx.pr

ADT 查看 android 源码 The source attachment does not contain the source

按Ctrl + 左击 所要查看的源码出现: The source attachment does not contain the source... step1:点击 project--->点击properties--->选中 Java Build Path 查看Source attachment/Javadoc Location 这两个选项 step2:配置Source attachment/Javadoc Location 双击 Source attachment或者选中后点击Edit 在

Out of resources when opening file ‘./xxx.MYD’ (Errcode: 24)解决方法

今天朋友向我反映网站出现错误:Out of resources when opening file './xxx.MYD' (Errcode: 24)错误是因为打开的文件数超过了my.cnf的--open-files-limit.open-files-limit选项无法在mysql命令行 直接修改,必须在my.cnf中设定. 如果你要是不设置的话,他会取系统ulimit -n的值. 出错之时,参数配置如下: 1 2 3 4 5 6 7 mysql> show variables like 'op

Unable to load configuration. - bean - jar:file:../../ComputerScience/JavaEE/workspace/.metadata解决办法

在运行一个JavaEE的项目时,出现了如下的错误: unable to load configuration. - bean - jar:file:/../workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/WorkSystem/WEB-INF/lib/struts2-core-2.3.16.3.jar!/struts-default.xml:64:179 at org.apache.struts2.d

Fix Some bytes have been replaced with the Unicode substitution character while loading file XXX.cs with Chinese Simplified (GB2312) encoding

When we use <strong>visual studio</strong> open source file or any other file, we may encounter below problem:   <strong>File Load</strong> <strong>Some bytes have been replaced with the Unicode substitution character while l

Fix Some bytes have been replaced with the Unicode substitution character while loading file XXX.cs

When we use <strong>visual studio</strong> open source file or any other file, we may encounter below problem:   <strong>File Load</strong> <strong>Some bytes have been replaced with the Unicode substitution character while l

Non-ASCII character &#39;\xe8&#39; in file xxx.py on line 8, but no encoding declared

使用网上某个python程序,编译时报错: File "xxx.py", line 8         SyntaxError: Non-ASCII character '\xe8' in file xxx.py on line 8, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details 原因是缺少编码类型声明:no encoding declared 段首添加一行声明即可: