Use Groovy

xiaoxiao2021-03-06  38

1, install Groovy

l to http://groovy.codehaus.org/download Download the Groovy Binary version, the current version is 1.0-beta-6

l Different the file to the local file system

l Execute a GroovySh boot command shell, if the shell is started normally, the installation is successful

2, running Groovy

l Execute a GroovySH Start Command Shell, you can enter the Groovy statement directly

l Execute a GroovyConsole to launch a Swing mode's Groovy console, this is a simple Groovy editor

l Execute Groovy SomeScript.groovy [arguments] Run the specified Groovy script file

l Create a groovy script under UNIX: In the beginning of the file plus #! / usr / bin / env groovy, the permission to modify the file is executable, directly execute the file

3, compile Groovy

l Groovy provides a similar Ant task script Groovyc, which can compile the Groovy source file into normal class file: Groovyc SomeScript.groovy

l Operation environment reliance: JDK1.4, Groovy JAR file, JAR file in the ASM class library (in the lib directory)

转载请注明原文地址:https://www.9cbs.com/read-118332.html

New Post(0)