Groovy Interactive Console
note
The Groovy console becomes available if there is a Groovy library dependency in your project. So, ensure that your existing project has one or create a new Groovy project.
Thanks for your feedback!
You can open an interactive Groovy console in any project including a Java one and use the console as a temporary file to write and evaluate your code.
If dependencies in your project contain a Groovy library then the specified Groovy library is used to launch the Groovy console. If the dependencies do not contain a Groovy library, then the bundled Groovy library will be used.
note
The Groovy console becomes available if there is a Groovy library dependency in your project. So, ensure that your existing project has one or create a new Groovy project.
In the main menu, go to Tools | Groovy Console.
If you have more than one module in your project, click the project's name on the console toolbar and select a module from the list to change a classpath for the console.
The Groovy console starts in a separate tab in the editor.
You can enter code, the coding assistance is available as you type, or paste code from a different file. Press CtrlEnter or click to execute code and view the results in the Run tool window.
You can refer to a class from the Groovy console. Type the name of the class you need, select it and press Ctrl0B to jump to its declaration.
If you have an import statement in your code, you can run a partial selection of code omitting the import statement. The Groovy console will include the omitted part during the execution.
Thanks for your feedback!
Our website uses some cookies and records your IP address for the purposes of accessibility, security, and managing your access to the telecommunication network. You can disable data collection and cookies by changing your browser settings, but it may affect how this website functions. Learn more.
With your consent, JetBrains may also use cookies and your IP address to collect individual statistics and provide you with personalized offers and ads subject to the Privacy Notice and the Terms of Use. JetBrains may use third-party services for this purpose. You can adjust or withdraw your consent at any time by visiting the Opt-Out page.