protected static File findRawDir(File dir){
  for (int i=0; dir != null && i < 20; i++) {
    File rawDir=findResRawDir(dir);
    if (rawDir != null) {
      return rawDir;
    }
    dir=dir.getParentFile();
  }
  return null;
}

protected static File findRawDir ( File dir ) { for ( int i = 0 ; dir != null && i < 20 ; i ++ ) { File rawDir = findResRawDir ( dir ) ; if ( rawDir != null ) { return rawDir ; } dir = dir . getParentFile ( ) ; } return null ; }
look for the resource - directory in the current directory or the directories above . then look for the raw - directory underneath the resource - directory .
