NOTE: In this tutorial, the Groovy-Eclipse plugin is running on Eclipse 3.5.1. The user interface and task flow may vary somewhat in Eclipse 3.4.2.
GETTING HELP – If you have problems, send a message to http://xircles.codehaus.org/lists/eclipse-plugin-user@groovy.codehaus.org.
Do
See
1
In Eclipse, click File > New > Groovy Project.
If Groovy Project does not appear in the drop-down list, then select Other and search for Groovy Project in the dialog box.
|
|
2
In the New Groovy Project wizard, type a name in the Project Name box, and clickNext.
GroovyEclipse creates the project and a folder structure for it. A folder with the same name as the project appears in the Package Explorer. The project directory contains a src and a bin folder, each empty.
|
|
3
The tabs and options in the Build Settingswindow are identical to those in the the Java Development Tool (JDT).
Click Finish to proceed without customizing the build settings.
For information about build options, see Eclipse help for the New Java Project Wizard; it applies to Groovy projects as well.
|
|
4
Select the project in the Package Explorer, and click File > New > Groovy Class.
|
|
5
In the Groovy Class wizard, type a name for the class in the Name box, a name for the package in the Package field, and clickFinish to create the class and package.
If you type the name of an existing package in thePackage field, the class is created there.
Just like in the JDT, you can create a package as a separate step with File > New > Package, or when you use the create the first class
|
|
6
GroovyEclipse creates the new class. The new class, Greetings.groovy in this example, is listed in the Package Explorer, and opened in the editor.
Note that, as generated by GroovyEclipseGreetings.groovy already contains the package statement and class declaration.
|
|
7
Paste this code into the file:
static void main(def args) { def mygreeting = "Hello World" println mygreeting
}
|
|
8
Right click anywhere in the editor and thenRun > Run As > Groovy Script or Java Application.
Running as an Application will launch the compiled *.class files, whereas running as aScript will launch the uncompiled *.groovy files. In general, the results will be the same, but there are some subtle differences between the two.
|
|
9
The greeting is issued in the Console tab.
|
|
分享到:
相关推荐
groovy eclipse plugin2groovy eclipse plugin2groovy eclipse plugin2groovy eclipse plugin2groovy eclipse plugin2groovy eclipse plugin2groovy eclipse plugin2
Eclipse Groovy插件 Eclipse Groovy插件 Eclipse Groovy插件 Eclipse Groovy插件
groovy入门经典,groovyeclipse 插件
eclipse插件grails(groovy)配置方法
适用于eclipse3.5的groovy-eclipse插件
groovy eclipse plugin1groovy eclipse plugin1groovy eclipse plugin1groovy eclipse plugin1groovy eclipse plugin1groovy eclipse plugin1groovy eclipse plugin1groovy eclipse plugin1groovy eclipse plugin1
groovy eclipse 4.7 插件 离线 groovy eclipse 4.7 插件 离线
groovy_eclipse插件
groovy的eclipse插件,解压后拷贝至相应目录即可
groovy eclipse plugin2groovy eclipse plugin2groovy eclipse plugin2groovy eclipse plugin2groovy eclipse plugin3
在eclipse中安装groovy的必须插件。
eclipse安装groovy插件的步骤
eclipse中的groovy插件 eclipse中的groovy插件 实用
使用Eclipse开发Groovy的小插件
今天安装Groovy插件总是失败,好不容易搞定了,特上传给碰到相同问题的童鞋,附groovy eclipse 4.7 Oxygen2 离线安装包 ,以及教程!
最新版的Groovy和Grail的eclipse插件
本文档旨在教你如何在Eclipse中安装Groovy插件。
groovy的eclipse插件
Groovy-Plugin-eclipse 4.7版本-在线下载的插件-附说明,想在网上下载别人下载好的,又怕别人动过手脚,死磕在线下载,好几次才成功,放心使用!