Eclipse Run As Groovy Script by Default

997 views Asked by At

I'd like to run my Groovy project in Eclipse using a shortcut (CTRL+F11). The trouble is, every time I do so I get a "Select a way to run " dialog, which gives me the choice between Groovy Console, Groovy Script, Java Application.

I've already set a Run Configuration to use Groovy Script, and if I click that Run Configuration under the Run As menu, it just runs.

How can I get my project to execute from a keyboard shortcut without that dialog popping up? I can't imagine ever selecting one of the other options.

2

There are 2 answers

1
kpie On

Under Project>Properties>Java Build Path and then click on Java SE, what ever it may be, click finish.

On the off chance that you deleted your java system library you can o pick up a new one... http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

1
Roger Glover On

I've never been able to get a satisfactory keyboard shortcut for Groovy script runs out of ctrl-F11. Instead I use alt-shift-X and then press G when the menu appears.

For debugging I use alt-shift-D, then G.

Both are two-stroke, rather than one-stroke, solutions, but neither one forces me to use the mouse or the arrow keys.