美文网首页
第 1 章 起步

第 1 章 起步

作者: 南北东西总相随 | 来源:发表于2017-10-08 21:42 被阅读0次

第 1 章 起步

1.2 管理多个版本的 Groovy

参考笔记 SDKMAN Practice

$ sdk install groovy 2.4.1

1.3 使用 groovysh

打开交互式终端

$ groovysh
Groovy Shell (2.1.1, JVM: 1.7.0_141)
Type 'help' or '\h' for help.
groovy:000> help

For information about Groovy, visit:
    http://groovy.codehaus.org 

Available commands:
  help      (\h ) Display this help message
  ?         (\? ) Alias to: help
  exit      (\x ) Exit the shell
  quit      (\q ) Alias to: exit
  import    (\i ) Import a class into the namespace
  display   (\d ) Display the current buffer
  clear     (\c ) Clear the buffer and reset the prompt counter.
  show      (\S ) Show variables, classes or imports
  inspect   (\n ) Inspect a variable or the last result with the GUI object browser
  purge     (\p ) Purge variables, classes, imports or preferences
  edit      (\e ) Edit the current buffer
  load      (\l ) Load a file or URL into the buffer
  .         (\. ) Alias to: load
  save      (\s ) Save the current buffer to a file
  record    (\r ) Record the current session to a file
  history   (\H ) Display, manage and recall edit-line history
  alias     (\a ) Create an alias
  set       (\= ) Set (or list) preferences
  register  (\rc) Registers a new command with the shell

For help on a specific command type:
    help command 

1.5 在命令行中运行 Groovy

$ cat Hello.groovy 
println "Hello Groovy!"
$ groovy Hello.groovy 
Hello Groovy!

在命令行中直接运行一些语句

$ groovy -e "println 'hello'"
hello

相关文章

  • 《Go语言入门经典》目录导航及思维导图

    1. 目录导航 第1章起步 第2章理解类型 第3章理解变量 第4章使用函数 第5章控制流程 第6章数组、切片和映射...

  • 第 1 章 起步

    第 1 章 起步 1.2 管理多个版本的 Groovy 参考笔记 SDKMAN Practice 1.3 使用 g...

  • 第1章 起步

    参考书籍:《Python编程 从入门到实践》 1. 安装geany文本编辑器 2. 运行python程序 从gea...

  • 读书总结《Spring实战》

    第1部分 Spring 基础 第1章 Spring 起步 Spring Boot 关键目录、文件 /src/mai...

  • Spring boot进行服务开发

    第0章:说明 为了进行服务的开发,简单介绍一下Spring Boot的使用源码所在位置 第1章:起步 这里会介绍一...

  • # Pro Git 阅读笔记

    第 1 章:起步 1.1 初次运行 Git 前的配置 /etc/gitconfig 文件:系统中对所有用户都普遍适...

  • 用户故事与敏捷方法

    第1部分 起步识别、编写、测试用户故事 第1章 概览帮助开发人员和客户团队双方协作,任何一方都不能占绝对主导地位,...

  • 第2章 Vue起步

    2-1 学习方法 多看一下官网api Vue官网务必把官网的小的demo自己敲一遍加深一下对语法糖的理解 2-2 ...

  • 《Go语言入门经典》1~3章读书笔记

    第1章 起步 1.4.1 使用go run编译并运行程序 在开发go代码时,go run提供了一种便利的方式编译并...

  • 意译道德经全文

    第1章 第2章 第3章 第4章 第5章 ...

网友评论

      本文标题:第 1 章 起步

      本文链接:https://www.haomeiwen.com/subject/uvvyyxtx.html