This API depends on the gnome library, you need to have gnome libraries installed for this to work.
Something similar sudo apt-get install libgnome
should do the trick i think (do not have my ubuntu desktop at hand to check the package name, try apt-cache search libgnome
to find the real name if this does not work).
Note : you should specify which JVM you are using, I assume it's oracle JVM.
You could also give browserlaunch2 a try, yet it's rather old and I've never used it myself. As written on it's website it is meant to open the default browser on the supplied url :
BrowserLauncher2, a continuation of the BrowserLauncher project, is a library that facilitates opening a browser from a Java application and directing the browser to a supplied url. In most cases the browser opened will be the user's default browser.
BrowserLauncher launcher = new BrowserLauncher();
launcher.openURLinBrowser("http://www.google.com");
As BrowserLauncher2 is open source, you could also have a look at how it detects the default browser.