Web Programming Languages

Web Coding in Groovy

Groovy is backwards-compatible with Java code. But Groovy code can also be run as scripts, so it may be possible to run Java code using the Groovy interpreter without actually compiling the source to virtual machine code ahead of time.

Theoretically, it is possible to run Groovy code as a script using a special shebang line that is a comment to the Groovy code but visible to the shell. But I'm having trouble getting this running. So to start, I'm using cgi files that look like this to invoke the Groovy code:

#!/bin/sh
/usr/local/bin/groovy hello.groovy