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. 深入浅出Javascript事件循环机制

    一.JS单线程.异步.同步概念 众所周知,JS是单线程(如果一个线程删DOM,一个线程增DOM,浏览器傻逼了-所以只能单着了),虽然有webworker酱紫的多线程出现,但也是在主线程的控制下.web ...

  2. 关于c#运算符的简单应用。。。

    按套路,先罗列一下各种运算符. 运算符的分类: 算数: +-*/(加减乘除)%(取余,就是除不尽剩下的,77/10就余7),++(加加)--(减减) 关系:>  <  >=  < ...

  3. 10、R常用命令

    转载:http://www.bio-info-trainee.com/579.html 关于R语言包的一些操作,挺重要的!!! R的包(package)通常有两种:1 binary package:这 ...

  4. opencv中读写视频

    1.介绍 OpenCV 读写视频之前,先介绍一下编解码器(codec) .如果是图像文件, 我们可以根据文件扩展名得知图像的格式.但是此经验并不能推广到视频文件中. 有些 OpenCV 用户会碰到奇怪 ...

  5. python开发[第二篇]------str的7个必须掌握的方法以及五个常用方法

    在Python中 基本数据类型有 str int boolean list dict tuple等 其中str的相关方法有30多个 但是常用的就以下7个 join  # split # find # ...

  6. Kinect插件使用

    Kinect Scripts文件夹下所有managers(管理器)的用途: 这些在KinectScripts文件夹下的管理器都是组件,你可以根据你想实现的功能在项目中使用它. KinectManage ...

  7. 浅聊本人学习React的历程——第一篇生命周期篇

    作为一个前端小白,在踏入前端程序猿行业的第三年接触了React,一直对于框架有种恐惧感,可能是对陌生事物的恐惧心里吧,导致自己一直在使用原生JS和JQ作为开发首选,但是在接触了React之后,发现了其 ...

  8. php 过滤掉多维数组空值

    //过滤掉空值 function filter_array($arr, $values = ['',[]]){ foreach ($arr as $k => $v) { if (is_array ...

  9. 如果Laravel 报错 file_put_contents(): failed to open stream

    问题解决方法 执行命令 php artisan cache:clear 并赋予 /storage 文件夹读写权限: chmod -R 777 storage: 若在执行 php artisan cac ...

  10. 【Linux】-Ubuntu下配置JDK1.8

    前言 这次实在是不想写前言了,好吧,那咱就不写了. 内容 怀着复杂的心情来整理这个小小的操作,其实我的内心是拒绝的,因为太简单了,但是我却花费了很长的时间,有效时间花费了将近两个小时去整理这个小玩意儿 ...