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
.
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.
File. getAbsolutePath() is used to obtain the absolute path of a file in the form of a string. This method requires no parameters.
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'.
Use the Eclipse menu:
File->Properties
or the shortcut:
Alt-Enter
You should be able to see the Location associated with the Resource
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With