Set Javac and Java SRC in Eclipse

zhaozj2021-02-16  96

Eclipse is a treasure, there is always a surprise place, and individual thinks Eclipse is as good as UltraEdit, Emacs.

1 Use the F1 key to adjust Javadoc help

Some people have asked this question on 9CBS. At that time, some netizens replied, saying that directly pressing the F1 key to call up Javadoc. Through the experiment, I found that for the JDK's own bag, F1, which can call up the corresponding Javadoc, and the US is not connected to the JDK document on the Sun website. This is exactly what I started to explore this problem.

Can you do it: Can I call the local Javadoc document with F1 via F1?

It's going to break the iron shoes, I'm looking back, that is actually in a dim light ^ _ ^

Method: In the Package Explorer view (or other) of the Java perspective, a referenced JAR package is displayed under each item. Select any jar package, select Properties from the Right-click menu, haha, see the two attributes in the properties dialog of the jar package? One is Javadoc Location, which sets the JAR package corresponding to the JAR package (folder or zip file) based on the prompt. My RT.JAR's Javadoc is:

Check, pass, finish.

2 View the source code of the reference JAR package

When Java programming, sometimes you want to see the source code of the referenced package, especially when you step Debug enter the system package. Let's solve this problem.

Or the above dialog box, the second attribute of the JAR package Java Source Attachment, is used to link the referenced JAR package and his source code. For example, rt.jar needs to connect to the source code of JDK (SRC.ZIP package):

Ok, Debug can see the source file of java.lang.string.

转载请注明原文地址:https://www.9cbs.com/read-11818.html

New Post(0)