IntelliJ IDEA Groovy(转)
更新环境变量:
source /etc/profile
验证是否成功:
# groovy -version
Groovy Version: 2.3.6 JVM: 1.7.0_67 Vendor: Oracle Corporation OS: Linux
打开groovyConsole:

4)、使用IDE进行开发(这里以Intellij idea 13.1为例)
1. Enable the plugin
Before you create your first Groovy application make sure Groovy plugin is enabled in Settings → Plugins.

2. Create a new project
Open Project Wizard and select Scala template. Since Groovy requires Java you have to specify the Project SDK.

If you create a Groovy project for the first time IntelliJ IDEA will offer you to create Groovy SDK library. Press Create button and choose directory with a Groovy SDK.

The IDE will create an empty project.

3. Create a new class
The easiest way to create Groovy class or script is to use Ctrl + N shortcut from Project View or Navigation Bar.

Choose between class, interface, enum and annotation with Up and Down arrows.

Let's create a class with a method returning 'Hello, world!' string.

4. Create a new script
Now we can create a script file via Ctrl + N shortcut.

Choose between script and GroovyDSL script with Up and Down arrows.

Now we can create an instance of our class and invoke hello method.
5. Run the project
In order to run the application you can manually create a Run configuration via Run → Edit configurations or run the active script automatically by pressing Ctrl + Shift + F10 shortcut.

使用Groovy Shell :
打开Tools-->Groovy Shell...

使用Groovy Console :
打开Tools-->Groovy Console...

http://www.it165.net/os/html/201409/9276.html
IntelliJ IDEA Groovy(转)的更多相关文章
- Groovy 配置环境变量
转载请标明出处:http://blog.csdn.net/zhaoyanjun6/article/details/70313790 本文出自[赵彦军的博客] 概念 Groovy 配置环境变量 开发工具 ...
- 30分钟groovy快速入门并掌握(ubuntu 14.04+IntelliJ 13)
本文适合于不熟悉 Groovy,但想快速轻松地了解其基础知识的 Java开发人员.了解 Groovy 对 Java 语法的简化变形,学习 Groovy 的核心功能,例如本地集合.内置正则表达式和闭包. ...
- Configuring Groovy SDK within IntelliJ IDEA
一.原因 IntelliJ IDEA期待一个the standard Groovy SDK 二.解决方案: 下载安装Groovy就可以了 官网下载地址: http://groovy-lang ...
- 利用IntelliJ IDEA创建第一个Groovy工程
因为某些原因,需要学习一下Groovy.关于Groovy的入门教程请看这篇文章http://www.ibm.com/developerworks/cn/education/java/j-groovy/ ...
- IntelliJ IDEA 内存优化最佳实践
本文作者在和同事的一次讨论中发现,对 IntelliJ IDEA 内存采用不同的设置方案,会对 IDE 的速度和响应能力产生不同的影响. Don't be a Scrooge and give you ...
- 【IDEA】intellij idea 插件推荐
CSDN 2016博客之星评选结果公布 [系列直播]零基础学习微信小程序! "我的2016"主题征文活动 博客的神秘功能 [IDEA]intellij idea ...
- [转]IntelliJ IDEA 使用心得与常用快捷键
IntelliJ IDEA 使用心得与常用快捷键 那种酸爽,根本说不出来—————————————————————————— by: Jimi没有BondJimi是谁? 就是洒家啊! 刚开始学习写Ja ...
- Atitit intellij idea的使用总结attilax
Atitit intellij idea的使用总结attilax 1. ideaIC-2016.2.4.exe1 1.1. Ij vs eclipse市场份额1 1.2. Ij的优点(方便的支持gro ...
- IntelliJ IDEA 使用总结[zz]
本文转自:http://cowboy-bebop.iteye.com/blog/1035550,仅做稍微整理,转载请注明出处. 1. IDEA内存优化 因机器本身的配置而配置: \IntelliJ I ...
随机推荐
- C++学习笔记3
函数小结 : 函数是有名字的计算单元,对程序(就算是小程序)的结构化至关重要. 函数的定义由返回类型.函数名.形參表(可能为空)以及函数体组成.函数体是调用函数时运行的语句块. 在调用函数时,传递给函 ...
- Eclipse中提高Android SDK Manager下载速度方法
在Windows-System32-drivers-ect目录下找到hosts文件 打开hosts文件(用记事本打开就可以),在文件以下填上一下内容: 203.208.46.146 www.googl ...
- Windows 7中怎样找到真正的Administrator账户
出于安全因素方面的考虑,默认情况下 Windows 7 的系统管理员 Administrator 账户处于禁用状态.需要使用时,开启它其实也很简单,并不需要复杂的操作. 方法一:从系统管理中启用Adm ...
- JSP的学习(7)——九大隐式对象之pageContext对象
本篇来讲诉JSP中九大隐式对象中最后一个,也是最重要的一个对象——pageContext对象. pageContext对象代表了该JSP页面的运行环境,它的作用有: ① 这个对象封装了对其它八大隐式对 ...
- Git Hub,eclipse pull 出现问题
一般在eclise里面使用geithub,之后会出现无法pull,或者pull 报错的问题.这里需要修改本地库的配置文件 The current branch is not configured fo ...
- android使用xfire webservice框架远程对sqlserver操作(包括增删改查)的实例!!已在真机上试验通过
前两天,公司有一个利用android远程操作sqlserver的项目,对此我是毫无头绪的,但也挺感兴趣的,于是开始上网搜索方法,网上有挺多方法了,发现使用webservice的挺多的,不过我对这些技术 ...
- jquery mobile 对手势触控提供了如下几个事件监听:
jquery mobile 对手势触控提供了如下几个事件监听: 复制代码代码如下: tap 当用户点屏幕时触发taphold 当用户点屏幕且保持触摸超过1秒时触发swipe 当页面被垂直或者水平拖动 ...
- 关于SIGSLOT的一个简单的程序
废话少说直接看代码即可,这只是一个简单的程序,可以帮我们简单地明白SIGSLOT是怎么回事.至于深入研究自己去百度吧. #include "sigslot.h" using nam ...
- Android各代码层获取系统时间的方法
1. 在java层,long now = SystemClock.uptimeMillis(); 2. 在native层,nsecs_t now = systemTime(SYSTEM_TIME_MO ...
- Swift - 点击输入框外部屏幕关闭虚拟键盘
我们如果把文本框的Return Key设置成Done,然后在storyboard中将文本框的Did End On Exit事件在代码里进行关联.同时关联代码里调用文本框的resignFirstResp ...