set java.awt.headless to true

This prevents getting a Dock icon on OS X, for example.