You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Use the following three simple steps to develop and run a Groovy script in NetBeans:

  1. Install Groovy-Eclipse Plugin.
  2. Develop a Groovy script.

To install Groovy-Eclipse Plugin


  1. Go to https://github.com/groovy/groovy-eclipse.
  2. Follow the instructions for installing Groovy-Eclipse Plugin.

To develop a Groovy Script


  1. Create a Groovy project.
  2. Right-click the project in Package Explorer and click Properties.
  3. Click Java Build Path in the tree on the left-hand side. Click the Libraries tab on the right pane.
  4. Click Add External JARs to add all the JAR files in <MagicDraw>/lib and in <MagicDraw>/plugins/com.nomagic.magicdraw.automaton/engines/groovy-2.0.1/embeddable/groovy-all-2.0.1.jar.
  5. Click OK to close the dialog.
  6. Create a new Groovy class in the project. Remove a class declaration, and then put the script there.