question: private static String maybeFixupURLForWindows ( String url ) { if ( url == null || url . length ( ) < 2 || url . charAt ( 0 ) == '\\' || url . charAt ( 1 ) == ':' ) return url ; String lower_url = url . toLowerCase ( ) ; int i = badEndings . length ; while ( i -- > 0 ) if ( lower_url . endsWith ( badEndings [ i ] ) ) return fixupURLForWindows ( url ) ; return url ; }
target:  If the default browser is Internet Explorer 5.0 or greater, the URL.DLL program fails if the url ends with .htm or .html . This problem is described by Microsoft at http://support.microsoft.com/support/kb/articles/Q283/2/25.ASP Of course, their suggested workaround is to use the classes from the microsoft Java SDK, but fortunately another workaround does exist. If you alter the url slightly so it no longer ends with ".htm", the URL can launch successfully. The logic here appends a null query string onto the end of the URL if none is already present, or a bogus query parameter if there is already a query string ending in ".htm"