public static Object displayURLonStandardBrowser ( final Component parentComponent , final String url ) { Object obj = null ; try { if ( System . getProperty ( SYSTEM_PROPERTY_OS_NAME ) . startsWith ( OS . MAC . getOs ( ) ) ) { obj = openURLinMacOS ( url ) ; } else if ( System . getProperty ( SYSTEM_PROPERTY_OS_NAME ) . startsWith ( OS . WINDOWS . getOs ( ) ) ) { obj = openURLinWindowsOS ( url ) ; } else { // if operate syste is Unix or Linux obj = openURLinUnixOS ( url ) ; } } catch ( final Exception e ) { JOptionPane . showMessageDialog ( parentComponent , "An exception occured attempting to run the default web browser\n" + e . toString ( ) ) ; } return obj ; }
This method opens the specified url in the standard web - browser .