I think using xdg-open http://example.com is probably the best choice.
If they are not installed, I suggest that they can only have kde-open or gnome-open (both of which take the same file / url) or some other workaround, such as switching to normal browser executables, until you find one that can be performed (with which). If you need a complete list of workarounds / backups, I suggest reading xdg-open (this is a shell script that calls kde-open / gnome-open / etc or some other kind of backup).
But since xdg-open and xdg-mime (used for one of the backups) are shell scripts that I would recommend including in their application, and if calling which xdg-open does not allow adding them to the PATH temporary variable in your environment subroutines and will appeal to them. If xdg-open fails, I would recommend throwing an exception with the error message from what it printed on stderr, and catch the exception and print / display the error message.
I would ignore the java awt Desktop solution, as the error seems to indicate that they are not planning on supporting desktops without gnome in the near future.
Roman A. Taycher Apr 09 '14 at 12:03 on 2014-04-09 12:03
source share