dsummersl
dsummersl

Reputation: 6747

How can I prevent command line java processes from stealing focus in OSX?

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?

Upvotes: 21

Views: 2911

Answers (2)

bobfoster
bobfoster

Reputation: 59

Add to your shell configuration, e.g., .bashrc:

export MAVEN_OPTS=-Djava.awt.headless=true

Upvotes: 2

dsummersl
dsummersl

Reputation: 6747

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.

Upvotes: 27

Related Questions