加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 大数据 > 正文

groovy 学习笔记

发布时间:2020-12-14 16:44:27 所属栏目:大数据 来源:网络整理
导读:A short tutorial how to install Groovy on Ubuntu,Linux Mint and other similar distros. Download lastest Groovy build @?http://groovy.codehaus.org/Download?and upack it First create a groovy folder in /usr/lib 1 sudo mkdir /usr/lib/groovy T

A short tutorial how to install Groovy on Ubuntu,Linux Mint and other similar distros.

Download lastest Groovy build @?http://groovy.codehaus.org/Download?and upack it

First create a groovy folder in /usr/lib

1
sudo mkdir /usr/lib/groovy

Then move the unpacked groovy folder to it

mv groovy-1.8.6/ /usr/lib/groovy/

Our next step is to use update-alternatives to add a group of alternatives to the system

1
2
3
4
5
sudo update-alternatives -- install "/usr/bin/groovy" "groovy" "/usr/lib/groovy/groovy-2.4.6/bin/groovy" 1
"/usr/bin/groovyc" "groovyc" "/usr/lib/groovy/groovy-2.4.6/bin/groovyc" 1
"/usr/bin/groovyConsole" "groovyConsole" "/usr/lib/groovy/groovy-2.4.6/bin/groovyConsole" 1
"/usr/bin/groovysh" "groovysh" "/usr/lib/groovy/groovy-2.4.6/bin/groovysh" 1
"/usr/bin/java2groovy" "java2groovy" "/usr/lib/groovy/groovy-2.4.6/bin/java2groovy" 1

Then to check if everything is fine:

update-alternatives --config groovy

and finally

groovy - v

should give you:

Groovy Version: 1.8.6 JVM: 1.6.0_27 Vendor: Sun Microsystems Inc. OS: Linux

Lastly try groovyConsole for evaluating your Groovy script:

groovyConsole


通过步骤安装成功

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读