I am trying to initialise a FileInputStream object using a File object. I am getting a FileNotFound error on the line
fis = new FileInputStream(file);
I think you are executing the statement from eclipse or any java IDE and target file is also present in IDE workspace. You are getting the error as Eclipse cant read the target file in the same workspace. You can run your code from command prompt. It should not through any exception.
This is has to do with file permissions settings in the OS. You've started the java process as a user who has no access rights to the specific directory.
You might want to make sure that (in order of likely-hood):
Judging by the stacktrace you pasted in your post I'd guess that you do not have the rights to read the file.
The File class allows you to performs useful checks on a file, some of them:
boolean canExecute();
boolean canRead();
boolean canWrite();
boolean exists();
boolean isFile();
boolean isDirectory();
For example, you could check for: exists() && isFile() && canRead() and print a better error-message depending on the reason why you cant read the file.