This Java tip shows how to check if a file exists.

 import java.io.*;

public class FileTest {
  public static void main(String args[]) {
    File f = new File(args[0]);
    System.out.println
      (f + (f.exists()? " is found " : " is missing "));
  }
}