Java – How to get Current Directory in Linux/Windows






Java – How do I get the directory that a program is running from?

In this Tutorial We will learn how to print the path of current working directory. The code below is applicable for both Linux and window.

Other way of Getting the Current Working Directory in Java is by using java.io.File

 


Partner Sites

VideoToGifs.com

EasyOnlineConverter.com

SqliteTutorials.com


Stuff I use to make videos

Windows notebook – http://amzn.to/2zcXPyF

Apple MacBook Pro – http://amzn.to/2BTJBZ7

Desktop - http://amzn.to/2zct252

Microphone – http://amzn.to/2zcYbW1

notebook mouse – http://amzn.to/2BVs4Q3

Screen Recording Software – Camtasia