简体   繁体   English

如何在Eclipse中创建Groovy类

[英]How to create Groovy class in Eclipse

My Computer is Macbook pro, the computer's system version is: OS X 10.11.4 (OS X El Capitan) 我的电脑是Macbook pro,电脑的系统版本是:OS X 10.11.4(OS X El Capitan)

My Eclipse's version is 4.5. 我的Eclipse版本是4.5。

the Eclipse is installed Groovy plugin (URL is http://dist.springsource.org/milestone/GRECLIPSE/e4.3/ ) ; Eclipse安装了Groovy插件(URL为http://dist.springsource.org/milestone/GRECLIPSE/e4.3/ );

restart my Eclipse. 重启我的Eclipse。


I create a Groovy project ----> success 我创建了一个Groovy项目---->成功

I create a Groovy class ----> error ! 我创建了一个Groovy类---->错误!

have 2 alert . 有2个警报。

the 1st : 'Building workspace' has encountered a problem . 第一个:'建筑工作区'遇到了问题。 Errors occurred during the build . 构建期间发生错误。

error details : Errors occurred during the build.
Errors running builder 'Java Builder' on project 'GroovyJavaProject'.
org/codehaus/jdt/groovy/integration/LanguageSupportFactory

the 2nd : Creation of element failed . 第二个:元素的创建失败了。 org.eclipse.jdt.internal.core.CompilationUnit cannot be cast to org.codehaus.jdt.groovy.model.GroovyCompilationUnit. org.eclipse.jdt.internal.core.CompilationUnit无法强制转换为org.codehaus.jdt.groovy.model.GroovyCompilationUnit。

在此输入图像描述

Maybe the update site you have used is not the right one 也许您使用的更新站点不是正确的

From Groovy/Grails Tool Suite™ Downloads page the update link for Eclipse 4.5 is http://dist.springsource.com/release/TOOLS/update/e4.5/ . Groovy / Grails Tool Suite™下载页面,Eclipse 4.5的更新链接是http://dist.springsource.com/release/TOOLS/update/e4.5/

I believe the one you have used is for Eclipse 4.3. 我相信你使用的是Eclipse 4.3。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM