I need a JVM-based scripting language for my app and would like to see what else is out there besides Groovy, Ruby, and Python.
Google keeps pointing me to a dead page at http://scripting.dev.java.net/
I need a JVM-based scripting language for my app and would like to see what else is out there besides Groovy, Ruby, and Python.
Google keeps pointing me to a dead page at http://scripting.dev.java.net/
This is not a official list, but you can start here: http://en.wikipedia.org/wiki/List_of_JVM_languages
Rhino (JavaScript) is implemented in the Oracle JDK/JRE by default.
With this code you can see what scripting languages are available in your JDK:
import java.util.*;
import javax.script.*;
public class A {
public static void main( String[] args ) {
ScriptEngineManager mgr = new ScriptEngineManager();
List<ScriptEngineFactory> factories = mgr.getEngineFactories();
for (ScriptEngineFactory factory : factories) {
System.out.println("ScriptEngineFactory Info");
String engName = factory.getEngineName();
String engVersion = factory.getEngineVersion();
String langName = factory.getLanguageName();
String langVersion = factory.getLanguageVersion();
System.out.printf("\tScript Engine: %s (%s)%n", engName, engVersion);
List<String> engNames = factory.getNames();
for(String name : engNames) {
System.out.printf("\tEngine Alias: %s%n", name);
}
System.out.printf("\tLanguage: %s (%s)%n", langName, langVersion);
}
}
}
This example was obtained here: http://www.oracle.com/technetwork/articles/javase/scripting-140262.html
You may want to try Lua too. Take a look here: how can I embed lua in java?
The old page is located here (download to view, wrong content type set on response) http://java.net/projects/scripting/sources/svn/content/trunk/www/index.html?raw=true
The ones hosted on the JSR-223 project page can be browsed at http://java.net/projects/scripting/sources/svn/show/trunk/engines but the list is:
JSR-223 script engines
JSR 223 script engines maintained elsewhere
For download links look in the index.html I mention above. For any of the java.net projects just remove the dev so scripting.dev.java.net becomes scripting.java.net. You might have to browse in a repo for the old web pages.
One notable thing, the JavaScript engine (Rhino) is being completely rewritten for Java 8. The new name is Nashorn. For more see: http://openjdk.java.net/projects/nashorn/
I'm not aware of a comprehensive list.
However it is worth pointing out that you can use pretty much any embeddable JVM language for scripting purposes as long as it supports dynamic compilation / execution at runtime. It doesn't really matter if it is JSR233 or not.
For example, I use Clojure for scripting (with a custom DSL) in a few of my apps.
I've not tried it myself, but I think you could also use Scala: scala as scripting language
FWIW, my personal choices would be:
also i found this page: http://java-source.net/open-source/scripting-languages
they are mentioning other script languages, like a Basic like called JBasic, LUA, LuaJava... ePascal and many other