Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse: Get location of the current file?

Tags:

eclipse

If I've got a file open in Eclipse, how can I figure out where it is on the filesystem?

For example, in Vim I would use :pwd.

like image 447
David Wolever Avatar asked Nov 10 '09 20:11

David Wolever


People also ask

How do I copy a file path in Eclipse?

Just select the file tab and hit Ctrl + C to copy file basename into clipboard. Hit Alt + Enter to bring up the file properties with absolute path and copy it manually.

How do you create an absolute path in Java?

File. getAbsolutePath() is used to obtain the absolute path of a file in the form of a string. This method requires no parameters.

How do I open package explorer in Eclipse?

Upon running Eclipse you should see a pane labeled 'Package Explorer', probably on the left. If you do not see one, you can open it up by going to the Window menu, selecting Show View and Package Explorer. If it doesn't show up under Show View, select Other, then 'Java', then 'Package Explorer'.


1 Answers

Use the Eclipse menu:

File->Properties

or the shortcut:

Alt-Enter

You should be able to see the Location associated with the Resource

like image 185
Alexandre Pauzies Avatar answered Sep 21 '22 09:09

Alexandre Pauzies