code: public static String normalizeJDKVersion( String theJdkVersion )
      {
  
          theJdkVersion = theJdkVersion.replaceAll( "_|-", "." );
          String tokenArray[] = StringUtils.split( theJdkVersion, "." );
          List<String> tokens = Arrays.asList( tokenArray );
          StringBuffer buffer = new StringBuffer( theJdkVersion.length() );
  
          Iterator<String> iter = tokens.iterator();
          for ( int i = 0; i < tokens.size() && i < 4; i++ )
          {
              String section = (String) iter.next();
              section = section.replaceAll( "[^0-9]", "" );
  
              if ( StringUtils.isNotEmpty( section ) )
              {
                  buffer.append( Integer.parseInt( section ) );
  
                  if ( i != 2 )
                  {
                      buffer.append( '.' );
                  }
                  else
                  {
                      buffer.append( '-' );
                  }
              }
          }
  
          String version = buffer.toString();
          version = StringUtils.stripEnd( version, "-" );
          return StringUtils.stripEnd( version, "." );
      }
docs: Converts a jdk string from 1.5.0-11b12 to a single 3 digit version like 1.5.0-11
  
  @param theJdkVersion to be converted.
  @return the converted string.