First, Introduction
Groovy is a dynamic language that can be run on the Java platform in the same way that Java is used, and groovy and Java are basically seamlessly integrated, with some of the following features:
- is an agile dynamic language based on a Java virtual machine.
- Built on the powerful Java language and added many features learned from languages such as Python,ruby and Smalltalk.
- Provides Java developers with modern, most popular programming language features and low learning costs (almost 0).
- Support DSL (Domain specific languages domain definition language) and other concise syntax to make your code easier to read and maintain.
- Groovy has processing native types, object-oriented, and an ant DSL, making it very easy to create shell scripts.
- The developer's efficiency is greatly improved by the reduction of Framework code when developing Web,gui, database or console programs.
- Support for unit tests and simulations (objects) simplifies testing.
- Seamlessly integrates all existing Java objects and class libraries.
- Compile directly into Java bytecode, so you can use groovy anywhere you use Java.
Official website: http://www.groovy-lang.org/install.html
Second, installation configuration
Download the latest version groovy-2.4.3.zip, unzip the website
Vim. Bash_profile
Export groovy_home="/users/apple/documents/soft/groovy_soft/groovy-2.4.3"Export PATH= $PATH: $GROOVY _home/bin
ademacbook-pro:~ apple$ Groovy-2.4. 3 1.7. 0_71 vendor:oracle Corporation Os:mac OS X
Example:
Hellogroovy.groovy
" Hello Groovy "
Groovy Hellogroovy
Groovy Installation Configuration