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. Absolute Layout

    ----------------siwuxie095 根面板 contentPane 的默认布局为 Border Layout,将其 切换为 Absolute Layout Absolute Layo ...

  2. 无人驾驶——4.控制之MPC模型预测控制

    源自:<无人驾驶无人驾驶车辆模型预测控制>——龚建伟 参考:https://wenku.baidu.com/view/8e4633d519e8b8f67c1cb9fa.html 0.车辆模 ...

  3. Condition实现等待、通知

    使用Condition实现等待/通知: import java.util.concurrent.locks.Condition; import java.util.concurrent.locks.L ...

  4. 在Oracle 12C中使用scott账号

    在Oracle11g中默认是有scott账号的,但在Oracle 12C中则不能直接使用. 我的机器环境: 操作系统:Windows Server 2008 R2 64位 Oracle版本:Oracl ...

  5. 4.传统的MVC

    通过document view设计,我们把应用程序的状态(clicktimes)从一个简单的类设计中抽取出来.下一个目标是抽取转化主要的事件(这个例子里面是鼠标点击之后释放)为应用程序逻辑从而改变应用 ...

  6. Proxool Provider unable to load JAXP configurator file: proxoolconf.xml

    Proxool Provider unable to load JAXP configurator file: proxoolconf.xml log4j:WARN No appenders coul ...

  7. java全栈day13----Eclipse项目的jar包导出与使用jar包

    01eclipse快捷键 Ctrl+T:查看所选中类的继承树 例如,在下面代码中,选中Teacher类名,然后按Ctrl+T,就会显示出Teacher类的继承关系 * B: 查看所选中方法的源代码 ...

  8. MySQL数据导入导出方法与工具mysqlimport

    MySQL数据导入导出方法与工具mysqlimport<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office ...

  9. delphi xe6 让 ListView 在 Android 可回弹[根据龟山阿卍原创修改为xe6版本]

    Delphi XE6 找出 FMX.Platform.Android.pas 档案,并复制到自己的 Project 路径里,找到 GetScrollingBehaviour 函数,修改成如下: uni ...

  10. c# XML增删改查

    using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; usin ...