private static Object openURLinMacOS ( final String url ) throws ClassNotFoundException , NoSuchMethodException , IllegalAccessException , InvocationTargetException { final Class < ? > fileManagerClass = Class . forName ( MAC_FILE_MANAGER ) ; final Method openURL = fileManagerClass . getDeclaredMethod ( "openURL" , new Class [ ] { String . class } ) ; return openURL . invoke ( null , new Object [ ] { url } ) ; }
Opens the given URL in mac os .