If it is a regular file outside a .jar, you are using a relative path. That means, the path to the file is formed from the path where you are calling the file from + the relative path. To make it work, you should invoke java within src folder
More Related Contents:
- Android – Get real path of a .txt file selected from the file explorer
- Java NIO FileChannel versus FileOutputstream performance / usefulness
- Reading UTF-8 – BOM marker
- Java sending and receiving file (byte[]) over sockets
- byte[] to file in Java
- How do I get the file name from a String containing the Absolute file path?
- How to get absolute path to file in /resources folder of your project
- Find place for dedicated application folder
- How do I use Java to read from a file that is actively being written to?
- Java, List only subdirectories from a directory, not files
- What is the best/simplest way to read in an XML file in Java application? [closed]
- Check line for unprintable characters while reading text file
- java.lang.NoSuchMethodError in Flink
- Writing in the beginning of a text file Java
- Java: splitting the filename into a base and extension
- Run .jar from batch-file
- Strings written to file do not preserve line breaks
- File truncate operation in Java
- How to convert .txt file to Hadoop’s sequence file format
- Test if file exists
- Getting the last modified date of a file in Java
- Desktop API is not supported on the current platform
- How do I get a sound file’s total time in Java?
- adding progress bar to each table cell for file progress – Java
- java IO to copy one File to another
- Using Unicode characters for file names inside a zip archive
- Create file with given size in Java
- How to read a text file directly from Internet using Java?
- The system cannot find the file specified in java
- How to reference a File in raw folder in Android