code: public static int getVersionAsInteger() {
          StringTokenizer stk = new StringTokenizer(revNumber);
          String release = null;
          for (int i=0 ; stk.hasMoreTokens() ; i++) {
              String s = stk.nextToken();
              if (i==1) {
                  release = s;
                  break;
              }
          }
          stk = new StringTokenizer(release, ".");
          release = "";
          while (stk.hasMoreTokens()) {
              release += stk.nextToken();
          }
          int version = 0;
          try {
              version = Integer.parseInt(release);
          } catch (NumberFormatException e) {
              //
          }
          return version;
      }
docs: ===================================================================