Java Relative Paths: Complete Guide
- Relative path to the current working directory: such as “file.txt”
- Relative path to the current package: for example “com/example/file.txt”
- Relative path to parent directory: for example, “../file.txt”
- Relative path to a subdirectory of the current working directory: for example “folder/file.txt”
- Relative path to the classpath: for example “resources/file.txt”