[英]How can I set Chrome as default external browser in Eclipse for Mac?
I think that question is self-explained :-) 我认为这个问题是自我解释的:-)
When I browse to Application eclipse send me an error. 当我浏览Application eclipse时给我发错误。
The simplest way to get Eclipse to recognize Chrome as the default system browser is : 让Eclipse将Chrome识别为默认系统浏览器的最简单方法是:
This solution is more general as it applies to any application which chooses the incorrect system browser. 此解决方案更通用,因为它适用于选择不正确的系统浏览器的任何应用程序。 (thanks to Kelvin Lawrence at IBM)
(感谢IBM的Kelvin Lawrence)
I am using Eclipse 4.2.0 on an iMac with OSX Mountain Lion. 我在带有OSX Mountain Lion的iMac上使用Eclipse 4.2.0。 This also works for Eclipse Kepler on Mountain Lion.
这也适用于Mountain Lion上的Eclipse Kepler。
I posted the answer on another question like this on stackoverflow, so here it goes: 我在stackoverflow 上发布了关于这样的另一个问题的答案 ,所以在这里:
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%'. 我在博客帖子中找到了不再存在的解决方案,它涉及将Location配置为'/ usr / bin / open',参数为'%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.
这是OSX Lion上唯一适合我的方法。
我通过调用/usr/bin/open -a "/Applications/Google Chrome.app" <url>
解决了这个问题
rubdottocom almost got it. rubdottocom几乎得到了它。 The problem is, that the path contains spaces.
问题是,路径包含空格。 If you write a new shell script with the following content:
如果您编写包含以下内容的新shell脚本:
'/Applications/Google Chrome.app/Contents/MacOS/Google Chrome' $1
Eclipse can launch a new Chrome instance with it. Eclipse可以用它启动一个新的Chrome实例。 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:
遗憾的是,这样就不可能在已经运行的实例中打开一个新选项卡,因为脚本退出并显示以下错误消息:
[21043:2307:292361872340725:ERROR:process_singleton_mac.cc(102)]
Unable to obtain profile lock.
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. 您还可以尝试在菜单栏中修复eclipse:windows-> preferences-> general-> web browser->选择收音机,使用外部Web浏览器并从那里选择默认浏览器。 that simple.
那么简单。
Here's a helpful visual showing the /usr/bin/open
techinque: 这是一个有用的视觉效果,展示了
/usr/bin/open
techinque:
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?
我在这里找到答案: 有没有办法在Mac Builder的Flash Builder Standalone中将Google Chrome添加为外部网络浏览器?
The exact location is: /Applications/Google Chrome.app/Contents/MacOS/Google Chrome 确切位置为:/ 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 令人讨厌的是你无法通过Finder进入“应用程序文件夹”(AppName.app):-S
Oh Wait! 等一下! It's not working >_< Safari is opened
它不起作用> _ <Safari已打开
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. 在Finder中,右键单击Google Chrome.app ,选择Show Package Contents并浏览到Contents / Mac OS并将Google Chrome拖到Eclipse的Edit External Web Browser对话框中的Location 。 Enter -url %URL% in the field Parameters .
在“ 参数 ”字段中输入-url%URL% 。 This worked for me on Eclipse Indigo on MacOS 10.7, at least when Chrome was not started before...
这对我在MacOS 10.7上的Eclipse Indigo上起作用,至少在Chrome之前没有启动时......
我在Chrome中将Chrome设置为默认浏览器的方法是:转到Window >> Web浏览器,然后选择Chrome。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.