Prevent groovysh from stealing focus on macOS

43 Views Asked by At

When launching the Groovy REPL, groovysh, it also launches a separate support app that appears in the dock. This app thus steals focus meaning I can't start typing into the groovysh interpreter immediately; I need to click back to the terminal to get focus there again.

Is there a way to disable this behaviour or should I make a bug report? I found this old ticket which sounds promising but the focus theft persists.

1

There are 1 best solutions below

0
On

This worked for me:

groovysh -Djava.awt.headless=true