Adding web browsers to Eclipse on Mac OS X
Posted on 2010-02-28
As a web developer, I need to be able to use many browsers. I also use one browser for actually browsing the web, and another to develop.
Eclipse offers the possibility to target browsers. Simply go into the preferences of Eclipse, then into the “General” section, and then into the “Web Browser” subsection. You can next check the “Use external Web browser” to use a browser that is not part of Eclipse.
If your browser of choice is not on that list, you can click on “New” to add another one.
For example, I add Safari here. I selected the application from the “Applications” folder, however I got this:
That is quite baffling… I did as I usually would by selecting the Safari.app file, and got an error. I will be honest, I have no idea if this occurs on Windows, as I do not have access to that OS anymore.
I decided to try something before I googled for anything. I decided to go into the package content of the application.
If you are not familiar with this, know that in Mac OS X you can right-click onto an application and select “Show Package Contents”. This will present you the files that make up the application. The actual application file can be found in the “Contents/MacOS” folder.
Now, you cannot do all that from the Finder window that opens when you browse for files from an application. I believe that in this regards, Windows is better, since you actually have access to all the functionalities of the File Explorer even when browsing from whithin applications.
So, where does that leave us? Well, then the idea is to get the location of the file outside of Eclipse. You can always get such a location by dragging a file into the Terminal, or even into Spotlight. Then copy that location and paste it in the appropriate field.
There you go, multiple browsers are now available to you!