1       不用IDE开发groovy

1.1  不用IDE开发的方法

可以在IDE中运行Groovy类或者脚本,但是Groovy也提供了其他运行途径。你能运行Groovy代码基于以下:

·         the Groovy shell: groovysh

·         the Groovy interpreter: groovy

·         the Groovy Console : groovyConsole

·         complile Groovy code to classfiles and run it via the Java virtual machine

1.2  使用Groovy Console开发

Start the interactive Groovy Shell with the command groovyConsole. This console allows you to test Groovy code.

1.3  使用Groovy shell开发

Groovy shell是运行Groovy程序的最简单的方式。其允许你敲入命令,并执行。

Open a command shell (Start-> Run -> cmd under Windows) and start the groovy shell via "groovysh". Type in the following code:

在dos窗口中,输入“groovysh”,然后敲入以下代码

println("Hello Groovy") 

按下回车键,即可执行。

1.4  使用Groovy compiler 创建class文件

You can also complile Groovy code into Java bytecode to use it from Java. To use the byte code the Groovy runtime library must included in the Java classpath.

To create Java bytecode, run the groovyc Hello.groovy command.

1       不用IDE开发groovy

1.1  不用IDE开发的方法

可以在IDE中运行Groovy类或者脚本,但是Groovy也提供了其他运行途径。你能运行Groovy代码基于以下:

·         the Groovy shell: groovysh

·         the Groovy interpreter: groovy

·         the Groovy Console : groovyConsole

·         complile Groovy code to classfiles and run it via the Java virtual machine

1.2  使用Groovy Console开发

Start the interactive Groovy Shell with the command groovyConsole. This console allows you to test Groovy code.

1.3  使用Groovy shell开发

Groovy shell是运行Groovy程序的最简单的方式。其允许你敲入命令,并执行。

Open a command shell (Start-> Run -> cmd under Windows) and start the groovy shell via "groovysh". Type in the following code:

在dos窗口中,输入“groovysh”,然后敲入以下代码

println("Hello Groovy") 

按下回车键,即可执行。

1.4  使用Groovy compiler 创建class文件

You can also complile Groovy code into Java bytecode to use it from Java. To use the byte code the Groovy runtime library must included in the Java classpath.

To create Java bytecode, run the groovyc Hello.groovy command.

3 不用IDE开发groovy的更多相关文章

  1. 虚拟机安装中文Fedora14和C/C++IDE开发环境

    虚拟机安装中文Fedora14和C/C++IDE开发环境 2010-12-05 00:15:58 标签:中文Fedora14 IDE 开发环境 C/C++ 原创作品,允许转载,转载时请务必以超链接形式 ...

  2. 【第〇课】用更好的IDE开发

    推荐的IDE IntelliJ IDEA JetBrains是一家捷克的软件开发公司,这家公司做出了很多的优秀的IDE,有写python的.php的.web前端的……IDEA就是其中一款非常优秀的ja ...

  3. Qt的IDE开发环境(KDevelop,MonKey Studio,QDevlop,Dev-cpp,Cobras,Edyuk)

    讲到Qt的IDE开发环境,本人一直在Windows下使用VC6.0 + Qt4.3.1开发程序.但转到Linux下,使用Fedora中自带的KDevelop + Qt4.3.1开发程序. 最近一直做Q ...

  4. vc不用IDE编译方法

    一个EXE是如何形成的 比如一个源程序有以下两个文件. 1.c 1.rc 首先cl.exe 会把源代码编译为1.obj rc.exe会把1.rc编译为1.res link.exe会把1.obj 1.r ...

  5. centos6.5下Python IDE开发环境搭建

    自由不是想做什么就做什么,而是想不做什么就不做什么.        ---摘抄于2016/11/30晚 之前学习了一段时间的Python,但所有部署都在windows上.正赶上最近在学习liux,以后 ...

  6. 将vim打造成php的IDE开发环境

    将vim打造成IDE开发环境 本文主要介绍将vim打造成IDE开发环境,如代码补全,高亮显示,函数跳转,函数自动注释等 首先介绍2款VIM插件管理器:Vbundle,Pathogen 本文中的vim插 ...

  7. Github 开源:使用 .NET WinForm 开发所见即所得的 IDE 开发环境(Sheng.Winform.IDE)【2.源代码简要说明】

    GitHub:https://github.com/iccb1013/Sheng.Winform.IDE 在上一篇文章中,简要的介绍了  Sheng.Winform.IDE 的基本功能和要实现的目标: ...

  8. java基础-不用ide如何打包

    java基础-不用ide如何打包 1. 建立目录 src存放源文件 classes存放编译文件 2. 建立类文件 主类 package test.ant; import test.ant.MyTool ...

  9. UI5-学习篇-8-本地SAP WEB IDE开发

    1.本地SAP WEB IDE下载 UI5-学习篇-3-Local SAP WEB IDE下载 2.启动Orion服务 解压SAP WEB IDE文件后,双击Orion应用程序启动服务,如下图: 服务 ...

随机推荐

  1. Switch/Case 的穿透性

    /*键盘录入1到12 ,对应输出该月份对应的季节 .如果输入的不是1到12,输出提示信息:您输入的数据有误. PS: 春季:3,4,5月份 夏季: 6,7,8月份 秋季: 9,10,11月份 冬季:1 ...

  2. 面试题:3年工作经验 已看1 有用 memcache和redis有什么区别

    此内容偏中高级,适合有三年经验者. 1.       java中wait和sleep有什么区别?多线程条件下如何保证数据安全? 答:最大区别是等待时wait会释放锁(乐观锁),而sleep会一直持有锁 ...

  3. protocol buffers的使用示例

    protocol buffers的使用示例 如果不了解protocol buffers,可以先参看:http://blog.csdn.net/zhu_xun/article/details/19343 ...

  4. ZROI2018提高day3t1

    传送门 分析 我们可以用贪心的思想.对于所有并没有指明关系的数一定是将小的放在前面.于是我们按顺序在每一个已经指明大小顺序的数前面插入所有比它小且没有指明关系的数.详见代码. 代码 #include& ...

  5. 第二周个人作业:WordCount

    github地址 https://github.com/lzwk/WordCount PSP表格 PSP2.1 PSP阶段 预估耗时(分钟) 实际耗时(分钟) Planning 计划 20 40 · ...

  6. C++笔记--模板

    一个string模板 简单的定义 template <class C>//模板形式,C是一个类型名字,不一定是某个类的名字 class String{ struct srep; srep ...

  7. C++--VECTOR的简单应用

    在c++中,vector是一个十分有用的容器,下面对这个容器做一下总结. 1 基本操作 (1)头文件#include<vector>. (2)创建vector对象,vector<in ...

  8. C++: I/O流详解(三)——串流

    一.串流 串流类是 ios 中的派生类 C++的串流对象可以连接string对象或字符串 串流提取数据时对字符串按变量类型解释:插入数据时把类型 数据转换成字符串 串流I/O具有格式化功能 例: #i ...

  9. myql 服务启动不了怎么办

    今天,不小心手动将mysql 服务停掉后,怎么也启动不了,后面查了半天 ,终于知道要先将任务管理器里的mysql.exe 先Kill掉,然后可以启动了,记录一下

  10. Missing artifact com.oracle:ojdbc14:jar:10.2.0.4.0.jar的问题

    今天往STS工具中导入一个maven项目,导入后发现pom.xml文件的<dependency>处报错:Missing artifact com.oracle:ojdbc14:jar:10 ...