---
title: "Groovy Tip: Running Groovy from Sublime Text Editor - http://fizalihsan.wordpres"
author: "BenjaminYu"
date: "2014-07-04T16:27:30Z"
tags: ["Groovy", "sublime"]
categories: ["编程语言"]
slug: "groovy-tip-running-groovy-from-sublime-text-editor-http-fizalihsan-wordpres"
draft: false
lastmod: "2014-07-04T16:27:30Z"
id: 2088362
url: "https://benjaminyu.iteye.com/blog/2088362"
---

# http://fizalihsan.wordpress.com/2013/11/14/groovy-tip-running-groovy-from-sublime-text-editor/

# Groovy Tip: Running Groovy from Sublime Text Editor

[fizalihsan](http://fizalihsan.wordpress.com/author/fizalihsan/) / [November 14, 2013](http://fizalihsan.wordpress.com/2013/11/14/groovy-tip-running-groovy-from-sublime-text-editor/)

I just came across this cool little trick to compile and run Groovy scripts from Sublime Text Editor.

- Open the editor and go to menu Tools-&gt;Build System. This will open a new file named ‘*untitled.sublime-build*‘.
- Add the path to your Groovy installation directory as show below.

```
{
 "cmd": ["C:/apps/Groovy/groovy-2.1.9/bin/groovy.bat", "$file"]
}
```

- Now ‘save’ the file as ‘*groovy.sublime-build*‘.
- Open your groovy script and in the menu select ‘Tools-&gt;Build System-&gt;Groovy’
- To compile and execute, ‘Tools-&gt;Build’ or F7 or Ctrl+B.