public static File relativeFile(File f){
  if (f.isAbsolute()) {
    f=relativeFile(new File("."),f);
  }
  return f;
}

public static File relativeFile ( File f ) { if ( f . isAbsolute ( ) ) { f = relativeFile ( new File ( "." ) , f ) ; } return f ; }
turns the given path , if absolute , into a path relative to the vm ' s current working directory and leaves it alone otherwise
