Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

By default, Groovy-Eclipse comes installed with a 1.7 compiler. This is the compiler that is installed when you select the Groovy-Eclipse feature from the Groovy update site:

Image Modified

If you would like to install the 1.8.x compiler, then you must add one of the development update sites to your install manager:

...

To perform the installation, you must install the latest dev snapshot of Groovy-Eclipse as well as the Groovy Compiler 1.8 feature (the SDK and m2eclipse integration are optional):

Image Modified

Then click Next > and follow the instructions to complete the installation. A restart is necessary.

Table of Contents

Specifying compiler level on the command line

As of Groovy-Eclipse 2.5.2, it is possible to specify the compiler level when starting Eclipse from the command line. Just add the following arguments to the command line to start Groovy 1.7 when running Eclipse:

Code Block

-groovy.compiler.level 17

Or to force Groovy 1.8:

Code Block

-groovy.compiler.level 1718

It is possible to run multiple instances of Eclipse at the same time targeting different compiler levels as long as they point to different workspaces.

...

You can switch between the 1.7 and 1.8 compilers for your Eclipse workspace in the Preferences -> Groovy -> Compiler page:

Image Modified

Simply click the button and Eclipse will restart automatically. The hyperlink shown on the preference page will navigate you to this wiki page.

...

You can uninstall the 1.8 compiler through the update manager. In the lower right corner of the update manager, there is a link that says What is already installed?:

Image Modified

Click the link, select the Groovy 1.8 compiler, and then click Uninstall...:

Image Modified

Then follow the instructions and restart to complete the uninstallation process. Once the 1.8 compiler is uninstalled, you can follow the steps above to reinstall it.

...