I recently started using a MacBook Pro and it is turning into my primary development machine. And in the process I’m learning more about Mac OS X every day. For instance, when I first started using Eclipse on the Mac, I could not figure out how to start multiple instances of Eclipse.
I generally categorize my projects into multiple Eclipse workspaces and at times like having them open at the same time. In Windows/Linux OSes, this is a no-brainer – just click on the shortcut and this will start up a new process. But in Mac OS X, clicking on the Eclipse launcher in the taskbar just brought the existing Eclipse process into the foreground.
Finally I found out that I could accomplish what I wanted with the open command. Add it to a script as shown below and bingo, starting up multiple Eclipse workspaces is a piece of cake.
#!/bin/bash ECLIPSE_HOME=~/tools/editors/eclipse35-JEE-x86_64/eclipse open -n $ECLIPSE_HOME/Eclipse.App