Skip to content
Skip to breadcrumbs
Skip to header menu
Skip to action menu
Skip to quick search
Quick Search
Browse
Pages
Blog
Labels
Attachments
Mail
Advanced
What’s New
Space Directory
Feed Builder
Keyboard Shortcuts
Confluence Gadgets
Log In
Sign Up
Dashboard
Groovy
Copy Page
You are not logged in. Any changes you make will be marked as
anonymous
. You may want to
Log In
if you already have an account. You can also
Sign Up
for a new account.
This page is being edited by
.
Paragraph
Paragraph
Heading 1
Heading 2
Heading 3
Heading 4
Heading 5
Heading 6
Preformatted
Quote
Bold
Italic
Underline
More colours
Strikethrough
Subscript
Superscript
Monospace
Clear Formatting
Bullet list
Numbered list
Outdent
Indent
Align left
Align center
Align right
Link
Table
Insert
Insert Content
Image
Link
Attachment
Symbol
Emoticon
Wiki Markup
Horizontal rule
tinymce.confluence.insert_menu.macro_desc
Info
JIRA Issue
Status
Gallery
Tasklist
Table of Contents
Other Macros
Page Layout
No Layout
Two column (simple)
Two column (simple, left sidebar)
Two column (simple, right sidebar)
Three column (simple)
Two column
Two column (left sidebar)
Two column (right sidebar)
Three column
Three column (left and right sidebars)
Undo
Redo
Find/Replace
Keyboard Shortcuts Help
<p>Groovy-Eclipse supports the 2.0, 1.8, and 1.7 compiler for Groovy. However, due to Groovy-Eclipse's tight integration with the compiler, only one version of the compiler can be used in the workspace at one time. Switching compiler levels requires a restart.</p><p>By default, Groovy-Eclipse comes installed with a 1.7 and 1.8 compiler. These are the compilers that are installed when you select the Groovy-Eclipse feature from the Groovy update site:</p><p><img class="confluence-embedded-image confluence-content-image-border" height="227" width="443" src="/download/attachments/231082312/groovy-install.png?version=1&modificationDate=1371625723389" data-image-src="/download/attachments/231082312/groovy-install.png?version=1&modificationDate=1371625723389" data-linked-resource-id="231377063" data-linked-resource-type="attachment" data-linked-resource-default-alias="groovy-install.png" data-base-url="http://docs.codehaus.org" data-linked-resource-container-id="231082312" title="null > groovy-install.png"></p><p>If you would like to install the 2.0.x compiler, then you go to the Eclipse install manager and select the Groovy 2.0 compiler from the extra compilers section of the update site:</p><p><img class="confluence-embedded-image confluence-content-image-border" height="81" width="311" src="/download/attachments/231082312/groovy-install2.png?version=1&modificationDate=1371625723379" data-image-src="/download/attachments/231082312/groovy-install2.png?version=1&modificationDate=1371625723379" data-linked-resource-id="231377062" data-linked-resource-type="attachment" data-linked-resource-default-alias="groovy-install2.png" data-base-url="http://docs.codehaus.org" data-linked-resource-container-id="231082312" title="null > groovy-install2.png"></p><p>Then click <em>Next </em>and follow the instructions to complete the installation. A restart is necessary.</p><p>Here are the release update sites for Groovy-Eclipse:</p><table class="confluenceTable"><tbody><tr><th class="confluenceTh">Eclipse level</th><th class="confluenceTh">Release update site</th></tr><tr><td class="confluenceTd">4.2 (Juno)</td><td class="confluenceTd"><code><a href="http://dist.springsource.org/release/GRECLIPSE/e4.2">http://dist.springsource.org/release/GRECLIPSE/e4.2</a></code></td></tr><tr><td class="confluenceTd">3.7 (Indigo)</td><td class="confluenceTd"><code><code><a href="http://dist.springsource.org/release/GRECLIPSE/e3.7/">http://dist.springsource.org/release/GRECLIPSE/e3.7/</a></code></code></td></tr></tbody></table><p><img class="editor-inline-macro" src="/plugins/servlet/confluence/placeholder/macro?definition=e3RvY30&locale=en_GB&version=2" data-macro-name="toc"></p><h3>Compiler levels</h3><p>After installing Groovy-Eclipse without the extra compilers, the Groovy 1.8 compiler is active by default. And the Groovy 2.0 compiler becomes active after installing the extra compiler.</p><h3>Specifying compiler level on the command line</h3><p>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 a particular Groovy version when running Eclipse:</p><table class="confluenceTable"><tbody><tr><th class="nohighlight confluenceTh">Groovy 1.7</th><th class="nohighlight confluenceTh"><pre>-groovy.compiler.level 17</pre></th></tr><tr><td class="confluenceTd">Groovy 1.8</td><td class="confluenceTd"><pre>-groovy.compiler.level 18</pre></td></tr><tr><td class="confluenceTd">Groovy 2.0</td><td class="confluenceTd"><pre>-groovy.compiler.level 20</pre></td></tr></tbody></table><p>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.</p><p>Alternatively, you can add the arguments to the <code>eclipse.ini</code> file (must be on separate lines and before the <code>-vmargs</code> entry.</p><h3>Switching compiler levels in the preference page</h3><p>You can switch between the 1.7 and 1.8 compilers for your Eclipse workspace in the <em>Preferences -> Groovy -> Compiler</em> page:</p><p><img class="confluence-embedded-image confluence-content-image-border" src="/download/attachments/231082312/preference_page.png?version=1&modificationDate=1371625723399" data-image-src="/download/attachments/231082312/preference_page.png?version=1&modificationDate=1371625723399" data-linked-resource-id="231377064" data-linked-resource-type="attachment" data-linked-resource-default-alias="preference_page.png" data-base-url="http://docs.codehaus.org" data-linked-resource-container-id="231082312" title="null > preference_page.png" data-element-title="preference_page.png"></p><p>Simply click the button and Eclipse will restart automatically. The hyperlink shown on the preference page will navigate you to this wiki page.</p><h3>Uninstalling the 2.0 compiler</h3><p>You can uninstall the 2.0 compiler through the update manager. In the lower right corner of the update manager, there is a link that says <em>What is already installed?</em>:</p><p><img class="confluence-embedded-image confluence-content-image-border image-center" src="/download/attachments/231082312/what_is_installed.png?version=1&modificationDate=1371625723447" data-image-src="/download/attachments/231082312/what_is_installed.png?version=1&modificationDate=1371625723447" data-linked-resource-id="231377068" data-linked-resource-type="attachment" data-linked-resource-default-alias="what_is_installed.png" data-base-url="http://docs.codehaus.org" data-linked-resource-container-id="231082312" title="null > what_is_installed.png" data-element-title="what_is_installed.png"></p><p>Click the link, select the Groovy 2.0 compiler, and then click <em>Uninstall...</em>:</p><p><img class="confluence-embedded-image confluence-content-image-border" height="203" width="798" src="/download/attachments/231082312/alreadyinstalled.png?version=1&modificationDate=1371625723345" data-image-src="/download/attachments/231082312/alreadyinstalled.png?version=1&modificationDate=1371625723345" data-linked-resource-id="231377061" data-linked-resource-type="attachment" data-linked-resource-default-alias="alreadyinstalled.png" data-base-url="http://docs.codehaus.org" data-linked-resource-container-id="231082312" title="null > alreadyinstalled.png"></p><p>Then follow the instructions and restart to complete the uninstallation process. Once the 2.0 compiler is uninstalled, you can follow the steps above to reinstall it.</p><h3>Switching from outside of Eclipse</h3><p>If you cannot switch compilers from the Groovy Compiler preference page, follow the instructions to perform the switch from outside of Eclipse:</p><ol><li>Shut down Eclipse</li><li>Go to eclipse/configuration/org.eclipse.equinox.simpleconfigurator</li><li>Make a backup copy of bundles.info</li><li>Open bundles.info in a text editor</li><li>Find the line for org.codehaus.groovy_1.8 and delete (thus leaving the 1.7 compiler enabled)</li><li>Restart eclipse</li></ol><p>To re-enable the 1.8 compiler, simply reinstate the backed up copy of bundles.info.</p><h3>Another possibility</h3><p>Over at <a href="http://en.appsatori.eu/2011/05/easy-switching-between-groovy-eclipse.html">AppSatori</a> there is another suggestion on how to do compiler switching. It requires a little more setup than the proposal here, but it allows you to run two workspaces simultaneously using each compiler.</p><h3>Problems or questions?</h3><p>There are several possibilities for getting support on your Groovy-Eclipse installation. See <a class="confluence-link" href="/display/GROOVY/Eclipse+Plugin+FAQ#EclipsePluginFAQ-Raisingissuesandaskingquestions" data-anchor="Raising issues and asking questions" data-linked-resource-id="126320732" data-linked-resource-type="page" data-linked-resource-default-alias="Eclipse Plugin FAQ#Raising issues and asking questions" data-base-url="http://docs.codehaus.org">here</a> for your support options.</p><p> </p>
Please type the word appearing in the picture.
Attachments
Labels
Location
Watch this page
< Edit
Preview >
Loading…
Save
Cancel
Next hint
search
attachments
weblink
advanced