如何在Eclipse Editor中打开外部浏览器 [英] How to open a External browser in Eclipse Editor

查看:182
本文介绍了如何在Eclipse Editor中打开外部浏览器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

解决方案



如何打开外部浏览器,如Safari从开放选项与Eclipse插件程序化?

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

这将打开外部浏览器。


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

解决方案

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

This will open the external browser.

这篇关于如何在Eclipse Editor中打开外部浏览器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆