如何在Eclipse中安装java库的源代码?
This happens automatically if you set up a JDK rather than a JRE.
Normally, when you start eclipse, it sets up the JRE that was used to start eclipse. You'll usually want to override this with a JDK so you get the source. To do this:
This will set up the source properly for you.
You can do it in the project preferences, but I find quite faster just to ctr+click over a object or class defined in the standard library and then "attach source" in the page that will gently inform you that there are no sources attached.
You then can point to the "src.zip" in your JDK distribution.
The way that I do it:
Prerequisite: you have the source downloaded. It comes with the JDK. (src.zip)
WHat do you mean with java source? The java.lang package? Because there shouldn't be a need to "install" them. Creating a new Java Project ( any kind of Java Project) should be enough. Could you describe your problem in more detail?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.