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. 吐槽下linq to sql的分页功能

    在调试程序的时候发现一个非常奇怪的问题: 用使用linq分页,分页到第二页的时候,第二页里面有第一页里出现的数据,开始还以为是. linq语句写的有问题,调试半天,无解.后来发现是因为没有排序的缘故. ...

  2. Luogu 3625 [APIO2009]采油区域

    想了很久的dp,看了一眼题解之后感觉自己被安排了. 发现从一个矩形中选择三个不相交的正方形一共只有六种取法. 那么我们可以处理出四个值: $f_{i, j}$分别表示以$(i, j)$为右下角,左下角 ...

  3. java全栈day06---数组的练习 冒泡排序

    水仙花练习功能实现 * A: 水仙花练习功能实现 * a: 题目分析 * 明确什么样的数就是水仙花数.水仙花数是指一个3位数(100-999之间),其每位数字立方之和等于该3位数本身. 如153 = ...

  4. spring、spring mvc以及IOC的阅读

    spring vs spring-mvc spring是应用级框架 spring mvc只是一个mvc框架 spring现在包含很多子模块,我们用的最多的是依赖注入. spring模块可分为以下: C ...

  5. Picasso VS Glide

    原文: Introduction to Glide, Image Loader Library for Android, recommended by Google 在泰国举行的谷歌开发者论坛上,谷歌 ...

  6. DotNetty 版 mqtt 开源客户端 (MqttFx)

    一.DotNetty背景介绍 某天发现 dotnet  是个好东西,就找了个项目来练练手.于是有了本文的 Mqtt 客户端   (github:  MqttFx ) DotNetty是微软的Azure ...

  7. ASP.NET MVC底层原理与框架

    前言 鄙人有一毛病,喜欢钻研原理性的东西,感觉只知道怎么用还不太够,更想知道如何实现的以及为什么会这样. 暑假的时候做积分系统是第一次接触MVC,感觉MVC就是一个框架,分为Module ,view和 ...

  8. 「BZOJ 2440」完全平方数「数论分块」

    题意 \(T\)组数据,每次询问第\(k\)个无平方因子的数(\(1\)不算平方因子),\(T\leq 50,k\leq 10^9\) 题解 \(k\)的范围很大,枚举肯定不行,也没什么奇妙性质,于是 ...

  9. BZOJ1096 [ZJOI2007]仓库建设(斜率优化)

    题目背景 小B的班级数学学到多项式乘法了,于是小B给大家出了个问题:用编程序来解决多项式乘法的问题. 题目描述 L公司有N个工厂,由高到底分布在一座山上. 工厂1在山顶,工厂N在山脚. 由于这座山处于 ...

  10. [bzoj2743][HEOI2012]采花(树状数组)

    题目描述 萧薰儿是古国的公主,平时的一大爱好是采花. 今天天气晴朗,阳光明媚,公主清晨便去了皇宫中新建的花园采花. 花园足够大,容纳了n朵花,花有c种颜色(用整数1-c表示),且花是排成一排的,以便于 ...