zoukankan      html  css  js  c++  java
  • 3 不用IDE开发groovy

    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.

  • 相关阅读:
    『奇葩问题集锦』npm install 报错 node-pre-gyp ERR! node-pre-gyp -v v0.6.25
    『奇葩问题集锦』Ruby 切换淘宝源报错WARNING: Error fetching data: SSL_connect returned=1 errno=0 state=SSLv3 read s erver certificate B: certificate verify failed
    一分钟搭建Webpack+react+es6框架
    『奇葩问题集锦』Cannot find module 'webpack/lib/node/NodeTemplatePlugin'
    『奇葩问题集锦』Zepto 页面唤醒拨号功能点透
    webpack面试题(转载)
    手机端样式
    输入框问题
    白色表单隐式边框阴影
    线性渐变css
  • 原文地址:https://www.cnblogs.com/yaoyuan2/p/5708948.html
Copyright © 2011-2022 走看看