Use GVM to build the Groovy development environment and third-party jar package path Configuration

Source: Internet
Author: User

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:

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.