微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

my First groovy

1 下载 groovy  in Eclipse

 (1)  可以采用 Eclipse 中的自动更新。    

Update Site The update site containing the most recent release is here: http://dist.codehaus.org/groovy/distributions/update/

Go to: Help -> Software Updates -> Find and Install -> Search For New Features

Click on New Remote Site

Enter a name (eg: Groovy) in the Name field

copy the URL from above into the URL field and press OK

Check the new Groovy repository and press finish 

Under Select the Features to Install check the Groovy check Box (be sure to get the latest version) and press Next Accept the agreement and press Next

If the default location looks okay press Finish (this will download the plugin)

  If you get a warning that the plugin is unsigned click Install or Install All

(2) 或者直接 打开 http://dist.codehaus.org/groovy/distributions/update/

 下载 目录 features 和 plugins  的文件,并它们分别复制到 eclipse 安装目录下的 features 和 plugins ,然后重启eclipse 便可

2 新建一个 java 项目

 选中该 java 项目,右键  菜单 ——》 groovy  ——》 add  groovy nature 。

设置 groovy  的编译输出目录

选中新建的项目,右键 构造路径——》配置构造路径  

  • In the Package Explorer,right click on the "GroovyJava" project,and select: Build Path -> Configure Build Path
  • Select the Source tab and then use the browse button to change the Default Output Folder from bin to bin-groovy
  • Press OK,OK

3 编写 groovy 文件

 选中项目 右键 , new   ——》 other

选择 groovy ——》 groovy class 便可

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐