简体   繁体   中英

How to find file on classpath in eclipse

Sometimes I will meet some issue which is caused by classpath. Is there any tool or plugin in eclipse that can help me find files in the current project's classpath ? Go through the Referenced library in eclipse is not so efficient , wondering any other alternatives ? Thanks

I don't know if this is what you want, but you can try the following:

  1. enable "link with editor" 两个黄色箭头 in package explorer
  2. open the desired class by pressing F3 when the cursor is on the class name in one of your source files

    例如字符串类

  3. this will open the source of the given class (or the class file if no source is attached) and shows the respective file in the package explorer:

    在此处输入图片说明

If you are not currently using the class you can simply type the package and name of the class into your code temporarily using auto-completion. Then hit F3 to see where the class is located...

您可以使用“打开资源”快捷方式( Ctrl + R )。

Shortcut is cntrl+shift+R

您也可以为此自定义快捷键

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM