Use GVM to build the Groovy development environment and third-party jar package path Configuration
Recently I need to write a small program in Groovy, so I will download a policyat http://policy.codehaus.org. In this process, we found a good tool, GVM (the Groovy enVironment Manager), which is quite useful. the following is a brief introduction.
GVM is a tool for managing the groovy development environment. You can use this tool to easily query, download multiple versions of groovy, specify the desired version, or download and manage grails and gradle.
The following two steps are required to build a groovy development environment using GVM:
1. curl-s get.gvmtool.net | bash
This command is used to deploy gvm in the system. You need to re-source the shell configuration file to make some configurations take effect.
2. gvm install groovy
This command installs the latest stable version of groovy and specifies that this groovy version is currently in use.
There are other commands, which are described in detail at http://gvmtool.net.
------------------------------ Lili split line -----------------------------------------
Frequently, We need to download some third-party jar packages. So how can we set the path so that we can call these packages?
$ Yy_home/conf/groovy-starter.conf this file is used to configure groovy loading. The content of this file is as follows (with the comments removed ):
Load! {Groovy. home}/lib/*. jar
Load! {User. home}/. groovy/lib/*. jar
Load $ {tools. jar}
From this we can see that we can directly put the third-party jar package under $ HOME/. groovy/lib; another way is to add the path of the third-party jar package to this file.
Some articles have analyzed the groovy ClassLoader system in detail, which is quite good. If you are interested, you can refer to the following links:
You can start groovy programming happily.
Getting started with Groovy
Groovy details: click here
Groovy: click here
This article permanently updates the link address: