Scripting technologies

I wonder if you would like to help me make an comparison of different scripting engine available in java. Maybe make this thread sticky? If you reply with more or argue something, I will enter it in the list:

For each scripting language:

  • Name
  • Introduction
  • Status (dead or alive)
  • Deployment
  • Pros
  • Cons

I start with:

Name: Beansell
Description: This scripting language is very java like, but with a few things working differently.
Status: I think it is dead (but working well)
Deployment: Include the jar.
Pros: Easy to develop (both the actual scripting language and to include it in your application). Flexible variables inside the script, before you run a script you can set any value to be used inside the script.
Cons: Not the fastest scripting language around. Not 100% java-like.

Name: Janino (http://www.janino.net/)
Description: exact Java syntax, without any weird quirks like BeanShell
Status: Actively developed (i think)
Deployment: Include the jar.
Pros: Fast to run, since the code is compiled to java byte code which the VM can optimise using the Hotspot compiler. Uses the java syntax.
Cons: Can not process code which includes some of the more recent java language advancements, eg generics and varargs.

Name: Javascript, Java Scripting Examples
Descriptioin: javascript engine
Status: one of the “official” Sun java script engines
Deployment: use JDK6/JRE6 and its there already

My few scripting tests. I don’t have anything to give benchmarking or feature matrix. But after a short experimentation I find Java6 internal Javascript engine to be a fine candidate.

  • it’s there already on everyones machine (JDK6, JRE6)
  • no additional .jars required
  • easy to make app-domain interface+classes and call functions from javascript or vice-versa
  • can move back and fort class instances

My example has JRuby variation, it worked but cannot say much about it. Ruby syntax is still new to me.

  • Name: Pnuts
  • Introduction: In development since 1997 as a side project of a Sun Japan employee, Toyokazu Tomatsu.
  • Status (dead or alive): Alive. Still actively maintained by the original author.
  • Deployment: JAR.
  • Pros:
  • Shares type system with Java, which makes for cleaner integration.
  • Fast.
  • Stable.
  • Compiles to bytecode or can run interpreted.
  • Source for the Pnuts language is well written.
  • Designed to be similar to Java syntax. To add expressiveness, new syntax is not avoided (unlike Beanshell), but it is kept to a minimum (unlike Groovy). Generally the new syntax is optional, but useful.
  • Thorough documentation.
  • Nice module system for reusing code.
  • Comes with many useful modules.
  • Cons
  • Has never been hyped/marketed aggressively, so it lacks a large user community. The author and a handful of users actively answer questions on the mailing list though.
  • No IDE support. This is the toughest part of using most JVM languages. Pnuts does have its own simple debugger for stepping through scripts, but it is primitive.

https://pnuts.dev.java.net/
http://pnuts.org/articles/pnutsHighlights.html

It would probably make sense list the licensing terms of each as well.