The path should start from your computer's main folder if it’s an absolute path (like /home/user/file.txt). If it’s a relative path (like docs/file.txt), it starts from the folder where your program is running. You can find that folder using System.getProperty("user. dir")