I want my Eclipse plugin to call the URL that the default browser opens for users. This seems like pretty standard behavior, but I could not find any documents on how to do this.
Can anyone help?
You are looking for:
final IWebBrowser browser = PlatformUI.getWorkbench().getBrowserSupport().createBrowser( ... ); browser.openURL(url);
If you want it in an external browser, you do not need to create it. This is the way:
PlatformUI.getWorkbench().getBrowserSupport().getExternalBrowser().openURL(new URL("http://www.example.com/"));
Use Program.launch (String) from the SWT API.
(As an alternative, Java 6 introduced the Desktop class.)
Do you mean launching external windows (IE, FireFox, ...) outside of eclipse or opening an internal " browser " composite?
Since on the inside, org.eclipse.help.ui.internal.browser.embedded.EmbeddedBrowser seems to be able to detect any kind of main browser.
To open the user's default browser (as an internal or external window), this is the preference set in the general / web browser.