开发者

error in java This element has no attached source and the Javadoc could not be found in the attached Javadoc

I saw in one of my android project, at the beginning of the file:i have used import com.sun.media.sound.Toolkit;

When I hover the 开发者_如何学运维mouse on the line "Toolkit toolkit = Toolkit.getDefaultToolkit();" in my code to get more details on this, it shows "This element has no attached source and the Javadoc could not be found in the attached Javadoc." i have even included JRE System Library[JRE6] in my android project...

How to resolve this? Any detailed answer will be appreciated.


You need to add java doc and source not the lib in your IDE.


You'll need the Open JDK source. For Java 6, you can find it on the following page:

http://download.java.net/openjdk/jdk6/

Download the OpenJDK 6 source bundle and extract the contents. Once you do that, you can attach the source file through Eclipse.


On Mac, too, I had to go to the Project > Properties > Java Build Path and on the libraries page find the library:

> database.jar

and expand its arrow:

V database
.. Source attachment: (None)

click on the Source attachment row, hit edit then browse to find the path to the frigging database-source.jar which is right frigging next to it and apply it.

How incredibly lame!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜