I doubt that there is a way to control a web browser without knowing or having its API. If the web browser you want to control does not provide an API for your Java, then this is not possible.
If you want full control of your web browser, you should try to develop a plug-in using your APIs, not through JAVA.
If you just want to open the link in your default browser, try the following:
java.awt.Desktop.getDesktop().browse(java.net.URI.create("http://google.com"));
This code opens the URL of your default web browser. I used this to open many forum pages because it requires a login session to my web browser and saves all pages at once.
source share