Eshika
Eshika

Reputation: 321

How to open a External browser in Eclipse Editor

How to open an External browser like Safari from open option with in Eclipse plugin programmaticly?

Upvotes: 5

Views: 3118

Answers (1)

codejammer
codejammer

Reputation: 1676

try {
    PlatformUI.getWorkbench().getBrowserSupport().getExternalBrowser().openURL(new URL("http://stackoverflow.com"));
} catch (PartInitException | MalformedURLException e) {
    e.printStackTrace();
}

This will open the external browser.

Upvotes: 3

Related Questions