title: How do I run Groovy scripts as Java, from the command line?
body: <p>I'm trying to use groovyc, but something is not right:</p>
  
  <pre><code>&gt;echo println("Hello world") &gt; test.groovy
  &gt;groovy test.groovy
  Hello world
  &gt;groovyc test.groovy
  &gt;java -cp C:\utils\groovy-1.8.1\embeddable\groovy-all-1.8.1.jar test
  Error: Could not find or load main class test
  
  &gt;dir test.class
  ...
  
  11/10/2011  02:54 PM             7,104 test.class
  </code></pre>
  
  <p>What am I missing?</p>