I am trying to check if a log file is empty (meaning no errors) or not, in Java, on Windows. I have tried using 2 methods so far.
Method 1 (Failure)
The idea of your first snippet is right. You probably meant to check iByteCount == -1: whether the file has at least one byte:
iByteCount == -1
if (iByteCount == -1) System.out.println("NO ERRORS!"); else System.out.println("SOME ERRORS!");