I am using Intellij IDEA on Mac OSX 10.9.2. Usually I have the IDE on another space, and I switch between both. The problem is that when I run something from the IDE, the Java icon pops up in the dock, switching the space automatically, so I have to switch back to the IDE each time this happens. It is really annoying.
Is there anyway to prevent this from happening? I have tried the "headless" option, but it doesn't work.