如何将 Chrome 设置为 Eclipse for Mac 中的默认外部浏览器?
我认为这个问题是不言自明的:-)
当我浏览到应用程序 eclipse 时向我发送一个错误。
I think that question is self-explained :-)
When I browse to Application eclipse send me an error.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(9)
让 Eclipse 将 Chrome 识别为默认系统浏览器的最简单方法是:
该解决方案更通用,因为它适用于选择不正确的系统浏览器的任何应用程序。 (感谢 IBM 的 Kelvin Lawrence)
我在装有 OSX Mountain Lion 的 iMac 上使用 Eclipse 4.2.0。这也适用于 Mountain Lion 上的 Eclipse Kepler。
The simplest way to get Eclipse to recognize Chrome as the default system browser is :
This solution is more general as it applies to any application which chooses the incorrect system browser. (thanks to Kelvin Lawrence at IBM)
I am using Eclipse 4.2.0 on an iMac with OSX Mountain Lion. This also works for Eclipse Kepler on Mountain Lion.
我发布了 在 stackoverflow 上回答类似的另一个问题,所以这里是:
我在一篇不再存在的博客文章中找到了解决方案,它涉及将位置配置为“/usr” /bin/open',参数为'%URL%'。
您需要确保 google chrome 是您的默认浏览器并且它可以正常工作。这是在 OSX Lion 上对我有用的唯一方法。
I posted the answer on another question like this on stackoverflow, so here it goes:
I found the solution in a blog's post that doesn't exist anymore, it involves configuring the Location to be '/usr/bin/open' and the parameter is '%URL%'.
You need to make sure that google chrome is your default browser and it will work properly. This is the only method that worked for me on OSX Lion.
我通过调用
/usr/bin/open -a "/Applications/Google Chrome.app"
解决了这个问题I solved this by calling
/usr/bin/open -a "/Applications/Google Chrome.app" <url>
rubdottocom 几乎明白了。问题是该路径包含空格。如果您编写一个包含以下内容的新 shell 脚本:
Eclipse 可以使用它启动一个新的 Chrome 实例。遗憾的是,这样就无法在已运行的实例中打开新选项卡,因为脚本退出时会显示以下错误消息:
rubdottocom almost got it. The problem is, that the path contains spaces. If you write a new shell script with the following content:
Eclipse can launch a new Chrome instance with it. Sadly, this way it is not possible to open a new tab in an already running instance, as the script exits with the following error message:
哎呀!我在这里找到答案: 有没有办法将 Google Chrome 添加为 Flash Builder Standalone for Mac 中的外部 Web 浏览器?
确切位置是:
/Applications/Google Chrome.app/Contents/MacOS/Google Chrome
令人烦恼的是,您无法通过 Finder 进入“应用程序文件夹”(AppName.app) :-S
哦等等!它不起作用>_< Safari 浏览器已打开
Ooops! I find the answer here: Is there a way to add Google Chrome as an external web browser in Flash Builder Standalone for Mac?
The exact location is:
/Applications/Google Chrome.app/Contents/MacOS/Google Chrome
It's annoying that you can't enter inside to an "Application folder" (AppName.app) through Finder :-S
Oh Wait! It's not working >_< Safari is opened
您还可以尝试从 Eclipse 的菜单栏修复该问题:windows->首选项->常规->网络浏览器->浏览器选择收音机,使用外部网络浏览器,然后从那里选择您的默认浏览器。就这么简单。
you can also try to fix that from eclipse at the menu bar: windows->preferences->general->web browser-> select the radio, Use external web browser and choose your default browser from there. that simple.
以下是显示
/usr/bin/open
技术的有用视觉效果:Here's a helpful visual showing the
/usr/bin/open
techinque:在 Finder 中,右键单击Google Chrome.app,选择显示包内容,然后向下浏览至内容/Mac OS,然后拖动Google Chrome 到 Eclipse 的编辑外部 Web 浏览器对话框中的位置。在参数字段中输入-url %URL%。这对我在 MacOS 10.7 上的 Eclipse Indigo 上有效,至少在 Chrome 之前没有启动时......
In Finder, right click on Google Chrome.app, select Show Package Contents and browse down to Contents/Mac OS and drag Google Chrome to the Location in Eclipse's Edit External Web Browser dialog box. Enter -url %URL% in the field Parameters. This worked for me on Eclipse Indigo on MacOS 10.7, at least when Chrome was not started before...
我在eclipse中将Chrome设置为默认浏览器的方法是:
转到窗口>> Web 浏览器,然后选择 Chrome。
My method to set Chrome as a default browser in eclipse is:
Go to Window >> Web browser and then select Chrome.