Has anyone else noticed that their command line java applications in OSX create GUI processes that steal focus(ie, groovy, maven sub processes)? I'm finding it extremely annoying; probably b/c I've been living with it for like 6-8 months since I think OSX v10.6?
How can I prevent java processes from doing this in OSX?
Eventually I found the basic solution:
For Java applications in general you can specify that they are 'headless', by adding the option -Djava.awt.headless=true
to your java application.
Add to your shell configuration, e.g., .bashrc:
export MAVEN_OPTS=-Djava.awt.headless=true
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With