First off, a few things to note. First, compilers do not give Exceptions, they give compilation errors – what you are experiencing is at runtime, not compile-time. Second, fileIn.exists() != false
is equivalent to fileIn.exists()
, which is easier to read.
The actual problem you’re receiving is because your condition is false – which implies in your case that the file doesn’t exist. We can’t help more with that unless you post more code, but it’s pretty self-explanatory. See documentation on the checkArgument()
method here
solved Why does compiler gives this exception [closed]