Theis exception is thrown when java fails to open the file specified with pathname. Generally this exception can be seen when the constructors of RandomAccessFile, FileInputStream, and FileOutputStream classes are used.
Check the pathnames that you have provided within the methods or constructors. Also check the file that you try to write is not read-only.