开发者

How to use Eclipse to surf the java source

开发者 https://www.devze.com 2023-01-15 03:38 出处:网络
I download the Java JDK 6 source code .tar file, and I extracted all the files from it using java command. And I get those control, deploy, hotspot, j2se, etc. What do I do now to actually see al开发者

I download the Java JDK 6 source code .tar file, and I extracted all the files from it using java command. And I get those control, deploy, hotspot, j2se, etc. What do I do now to actually see al开发者_开发技巧l the source code? Any solutions of using Eclipse to do that?


If you've got eclipse configured correctly, you should just be able to hit F3 on (or otherwise search for) a type like java.lang.Object and be taken directly to its source. If not, you'll get a screen with a big "Attach Source" button, which you can use to point eclipse at the .zip file you downloaded.

You seem to be asking about setting up an eclipse project for the Java source code. There's no need to do that unless you plan on modifying the code.


If you are using eclipse and setup your project to use the a JDK installed on your machine you do no need to download the source as its included with jdk by default. Eclipse will recognize that you are using a jdk and you can "Open Declaration" on any object that is part of the standard library.

0

精彩评论

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