How to get file path in Idea IntelliJ IDE


If you have a file in your Java Project and you want to get the absolute path of it, you can make use of keyboard shortcuts: Command + Shift + C if you are using Mac, Windows + Shift + C on Windows OS,

  • Open the file in IntelliJ,
  • Now Press Shift twice,
  • Type "Absolute Path" and press enter to copy the absolue path of the file,
  • The path will get copied to the clipboard.
Example:
/Users/code2care/IdeaProjects/multi-tasking/src/input-file.csv
How to get file path in Idea IntelliJ IDE
How to get file path in Idea IntelliJ IDE
Advertisements
Try Out Code2care Dev Tools:

Advertisements

Advertisements
Code2care is an initiative to publish and share varied knowledge in programming and technical areas gathered during day-to-day learnings and development activities.

Students and software developers can leverage this portal to find solutions to their various queries without re-inventing the wheel by referring to our easy to understand posts. Technical posts might include learnings, tutorials, trouble-shooting steps, video tutorials, code snippets, how-to, blogs, articles, etc.

🎉 We are celebrating the 10th years of Code2care! Thank you for all your support!

We strongly support Gender Equality & Diversity.