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

后端 未结 2 569
醉酒成梦
醉酒成梦 2021-01-07 18:48

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 an

相关标签:
2条回答
  • 2021-01-07 19:38

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

    export MAVEN_OPTS=-Djava.awt.headless=true

    0 讨论(0)
  • 2021-01-07 19:39

    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.

    0 讨论(0)
提交回复
热议问题